UHF-Reader
Manual
ID ISC.ANT.U500/270 - DM
FEIG ELECTRONIC GmbH
Page 20 of 117
H71011-0e-ID-B.docx
6.3. CRC16 Calculation Algorithm
Polynomial:
x
16
+ x
12
+ x
5
+ 1
CRC_POLYNOM = 0x8408;
Start Value:
0xFFFF
CRC_PRESET = 0xFFFF;
C-Example:
unsigned int crc = CRC_PRESET;
for (i = 0; i < cnt; i++)
/* cnt = number of protocol bytes without CRC */
{
crc ^= DATA[i];
for (j = 0; j < 8; j++)
{
if (crc & 0x0001)
crc = (crc >> 1) ^ CRC_POLYNOM;
else
crc = (crc >> 1);
}
}