> And my feeble VB attempt: > > Option Explicit > Dim C16(255) As Long > > Sub CRC_Init() > Dim i As Long, j As Long > Dim crc As Long > For i = 0 To 255 > crc = i * 256 > For j = 0 To 7 > If crc >= &H8000 Then > crc = (crc * 2) Xor &H1021 > Else > crc = (crc * 2) Xor 0 > End If crc = crc AND &hffff > Next j > C16(i) = crc > Next i > End Sub I think the above is correct, try it and see. Regards Sergio Masci -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.