EasyManua.ls Logo

SAJ 8000m Series

SAJ 8000m Series
153 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8000m Series
- 146 -
8.6 CRC Checksum
For higher speed, CRC-16 uses tables. The following are C language source code
for CRC-16.
unsigned int crc_cal_value(unsigned char *data_value,unsigned char data_length)
{
int i;
unsigned int crc_value=0xffff;
while(data_length--)
{
crc_value^=*data_value++;
for(i=0;i<8;i++)
{
if(crc_value&0x0001)crc_value=(crc_value>>1)^0xa001;
else crc_value=crc_value>>1;
}
}
return(crc_value);
}

Related product manuals