Gary, The 8-bit CRC is calculated in exactly the same way as the 16-bit one. It just has a smaller CRC register. You could look for a few 16-bit examples at http://www.piclist.com/techref/microchip/crcs.htm Here is some code for the 8-bit CRC: ; CRC-8, polynomial x^8+x^2+x^1+x^0 ; ; Input: w - new data byte ; crc - current crc register value ; Output: ; crc - updated crc ; ; Notes: ; 1) data bits start from most significant bit ; 2) crc register is shifted left crc_update movwf temp movlw 8 movwf count crc_loop movf crc, w ;copy crc to w clrc ;shift the crc register left rlf crc, f xorwf temp, w ;x^8 XOR data bit (msb first) andlw 0x80 ;check XOR result in bit 7 movlw 0x07 ;x^2+x^1+x^0 skpz xorwf crc, f crc_next rlf temp, f ;prepare next data bit decfsz count, f goto crc_loop return Hope that helps! Nikolai -----Original Message----- From: questuk [mailto:questuk1@hotmail.com] Sent: Monday, July 23, 2001 8:13 AM To: PICLIST@mitvma.mit.edu Subject: [PIC]: 8 Bit CRC code required please? I have searched across the web and cannot find any 8 Bit CRC code, I can find 16 Bit but I don't think this will work! I am afraid that working polynomial out, is way above my head! The code I require is X^8 + x^2 + X^1 +1, this does not seem to be the standard but I assume I would just change a number in the routine? If anyone can help I would be very grateful Thanks Gary -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.