---------- Here is a implimintation of CRC in basic that I got off the net. I haven't tried it, nor looked at it close. But it may help validate your implimentation in PIC code if they both come up with same answer. Bill C. ************************* DECLARE FUNCTION CRC16& (Block$) DECLARE FUNCTION CRC32& (Block$) 'simple usage. print "CRC16 is:",crc16&("Now is the Time") print "CRC32 is:",crc32&("Now is the Time") DEFINT A-Z FUNCTION CRC16& (B$) 'Calculates CRC for Each Block DIM Power(0 TO 7) 'For the 8 Powers of 2 DIM CRC AS LONG FOR I = 0 TO 7 'Calculate Once Per Block to Power(I) = 2 ^ I ' Increase Speed Within FOR J NEXT I ' Loop CRC = 0 'Reset for Each Text Block FOR I = 1 TO LEN(B$) 'Calculate for Length of Block ByteVal = ASC(MID$(B$, I, 1)) FOR J = 7 TO 0 STEP -1 TestBit = ((CRC AND 32768) = 32768) XOR ((ByteVal AND Power(J)) = Power(J)) CRC = ((CRC AND 32767&) * 2&) IF TestBit THEN CRC = CRC XOR &H1021 ' <-- This for 16 Bit CRC NEXT J NEXT I CRC16& = CRC 'Return the Word Value END FUNCTION DEFSNG A-Z FUNCTION CRC32& (B$) 'Calculates CRC for Each Block DIM Power(0 TO 7) 'For the 8 Powers of 2 DIM CRC AS LONG FOR I = 0 TO 7 'Calculate Once Per Block to Power(I) = 2 ^ I ' Increase Speed Within FOR J NEXT I ' Loop CRC = 0 'Reset for Each Text Block FOR I = 1 TO LEN(B$) 'Calculate for Length of Block ByteVal = ASC(MID$(B$, I, 1)) FOR J = 7 TO 0 STEP -1 TestBit = ((CRC AND 32768) = 32768) XOR ((ByteVal AND Power(J)) = Power(J)) CRC = ((CRC AND 32767&) * 2&) IF TestBit THEN CRC = CRC XOR &H8005 ' <-- This for 32 Bit CRC NEXT J NEXT I CRC32& = CRC 'Return the Word Value END FUNCTION **********************