EasyDrive CV3100 Series Instruction Manual page 159

High performance general purpose inverter
Table of Contents

Advertisement

CV3100 series and MINI series high performance general purpose inverter instruction manual
unsigned int crc_chk(unsigned char* data, unsigned char length)
{
int j;
unsigned int reg_crc=0xffff;
while(length--)
{
reg_crc ^= *data++;
for(j=0;j<8;j++)
{
if(reg_crc & 0x01)
{ /* LSB(b0)=1 */
reg_crc=(reg_crc>>1) ^ 0Xa001;
}
Else
{
reg_crc=reg_crc >>1;
}
}
}
return reg_crc;// finally,pass back the value pf CRC register
}
9-25

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents