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;
}