欢迎访问ic37.com |
会员登录 免费注册
发布采购

TMC248 参数 Datasheet PDF下载

TMC248图片预览
型号: TMC248
PDF下载: 下载PDF文件 查看货源
内容描述: [Low-cost stepper driver]
分类和应用:
文件页数/大小: 40 页 / 1267 K
品牌: TRINAMIC [ TRINAMIC MOTION CONTROL GMBH & CO. KG. ]
 浏览型号TMC248的Datasheet PDF文件第23页浏览型号TMC248的Datasheet PDF文件第24页浏览型号TMC248的Datasheet PDF文件第25页浏览型号TMC248的Datasheet PDF文件第26页浏览型号TMC248的Datasheet PDF文件第28页浏览型号TMC248的Datasheet PDF文件第29页浏览型号TMC248的Datasheet PDF文件第30页浏览型号TMC248的Datasheet PDF文件第31页  
TMC248-LA DATASHEET (Rev. 1.01 / 2013-MAR-26)  
27  
10 Microstep Resolution  
After choosing the desired microstep resolution the microcontroller sends digital values for each  
microstep current via SPI. The following example shows how to initialize microsteps via SPI.  
SINE WAVE TABLE  
-
-
-
-
The sine wave table below is used for 4-bit microstepping.  
The absolute values are left-shifted by one bit.  
Bit 0 is the sign bit (phase direction bit).  
Bit 5 is the mixed decay bit. It is set when the absolute value is falling.  
FUNCTION  
The function in the example below generates the microsteps. The values are read from the sine wave  
table and output to the TMC248 (via SPI interface.) Call this function with the ccw parameter set to 1  
(to step in negative direction) or with ccw set to 0 (to step in positive direction). The function can be  
called in a timer interrupt, too.  
SENDING VALUES VIA SPI  
Set the CS line of the TMC248 low and send out the value of io by SPI (MSB first). Thereafter, set the  
CS line high again.  
EXAMPLE FOR GENERATING MICROSTEPS USING THE TMC248  
UCHAR sinus_tab[64]={0x00, 0x02, 0x06, 0x08, 0x0c, 0x0e, 0x10, 0x14,  
0x16, 0x18, 0x18, 0x1a, 0x1c, 0x1c, 0x1e, 0x1e,  
0x3e, 0x3e, 0x3e, 0x3c, 0x3c, 0x3a, 0x38, 0x38,  
0x36, 0x34, 0x30, 0x2e, 0x2c, 0x28, 0x26, 0x22,  
0x01, 0x03, 0x07, 0x09, 0x0d, 0x0f, 0x11, 0x15,  
0x17, 0x19, 0x19, 0x1b, 0x1d, 0x1d, 0x1f, 0x1f,  
0x3f, 0x3f, 0x3f, 0x3d, 0x3d, 0x3b, 0x39, 0x39,  
0x37, 0x35, 0x31, 0x2f, 0x2d, 0x29, 0x27, 0x23};  
volatile UCHAR PhaseCount=0;  
void step(char ccw)  
{
UINT MixedDecayXOR=0, io;  
if(!ccw)  
{
PhaseCount++;  
}
else  
{
//The "Mixed Decay" bits must be reversed when running in CCW  
direction  
PhaseCount--;  
MixedDecayXOR=0x820;  
}
io=((sinus_tab[PhaseCount & 63]<<6 | sinus_tab[(PhaseCount+16) &  
63]) ^ MixedDecayXOR);  
}
www.trinamic.com  
 复制成功!