09-16-2012 09:32 AM - edited 09-16-2012 09:33 AM
I want to generate an CRC table by formula Node,but the table which generated is not correct,could someone with experience could help me?
uInt8 j;
uInt16 i;
uInt16 crc, c;
uInt16 crc_tabccitt[255];
for (i=0; i<256; i++)
{
crc = 0;
c = ( i) << 8;
for (j=0; j<8; j++)
{
if ( (crc ^ c) & 0x8000 )
crc = ( crc << 1 ) ^ 0x1021;
else
crc = crc << 1;
c = c << 1;
}
crc_tabccitt[i] = crc;
}
09-16-2012 11:27 AM
How is it not correct?
Post your VI with a description what is wrong and what it should be.