> Not technically a PIC but an ARM Cortex part with a neat built in 32 bit > CRC calculator. Here's a 5 instruction ARM implementation of the CRC-CCITT polynomial x^16 + x^15 + x^5 + 1: ; R0[7:0] = input data, R1[15:0] = input and output crc. eor R0,R0,R1 LSR 8 ; R0 = t = (crc0 >> 8) ^ data eor R0,R0,R0 LSR 4 ; R0 = t ^ (t >> 4) eor R1,R0,R1 LSL 8 ; R1 = (crc0 << 8) ^ t eor R1,R1,R0 LSL 5 ; R1 = (crc0 << 8) ^ t ^ (t << 5) eor R1,R1,R0 LSL 12 ; R1 = (crc0 << 8) ^ t ^ (t << 5) ^ (t << 12) It's an implementation of http://www.dattalo.com/technical/software/pic/crc_1021.asm I must admit though, I never did test the ARM implementation. Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist