I am looking for source code to calculate the IEC 870-5-2 CRC source code. It is not the same as CCITT, or CRC16. The polynomial is x16 +x13 +x12 +x11 +x10 +x8 +x6 +x5 +2 +1. I'd really like a table driven version, but anything is OK.
To cal. x16, left shift x 16 times x<<16)
similarly, x13 is (x<<13).
thus, crc = (x<<16)+(x<<13)+(x<<12)+(x<<11)+(x<<10)+(x<<8)+(x<<6)+(x<<5)+2+1.
Maybe this will help you, it's a versatile CRC-calculator: http://rcswww.urz.tu-dresden.de/~sr21/crc.html
I am looking for an inverted 16 bit CRC calcutor with polyn. X16 X14 X12 X11 X9 X8 X7 X4 X1 +1 (=ADC9hex + 1). I don't know what the "+1" stands for (1 before polynomial?)
In any case, I can't find the correct settings in the above calculator to compute a good CRC-result.
Can you help me?