Calculating the CRC-16 should result F3 B2
F3 B2: Header CRC, the CRC-16 of 00 80 08 00, LSB first.
void crc (void)
{
char lob[] = {0x00,0x80,0x08,0x00}; //data = 00 80 08 00
Uint16 temp=0;
Uint16 rond;
maxk = 0xFFFF;
for(rond=0;rond<4;rond++)
{
maxk ^= lob[rond];
for(tel=0;tel<8;tel++){
maxk = maxk >>1 ;
temp = maxk & 1;
if (temp == 1){maxk ^= 0xA001;}
}
}
} // result should be F3 B2 or B2 F3 ?
I also used
//www.zorc.breitbandkatze.de/crc.html
I cannot, even with all settings get this result