your link has lot of info (more to confuse me), I found a lot of info and ways to do CRC, Witch is correct?
CRC-16 0xBB3D
CRC-16 (Sick) 0x56A6
CRC-CCITT (0x0000) 0x31C3
CRC-CCITT (0xFFFF) 0x29B1
CRC-CCITT (0x1D0F) 0xE5CC
CRC-DNP 0x82EA
CRC-32 0xCBF43926
these are CRC results from the SAME string "123456789" look at:
http://www.lammertbies.nl/comm/info/...lculation.html
i use this in a modbus network and its work, try differents if you have pb!
good luck
..................
GoSub Calcul_CRC16
BufTx[Nbr-2]=CRC16.LowByte
BufTx[Nbr-1]=CRC16.HighByte
SerOut2 InOut,BR,[STR BufTx\Nbr]
..................
Calcul_CRC16:
CRC16=$FFFF
For i=0 to Nbr-3
CRC16=CRC16^BufTx[i]
For j=1 to 8
IF CRC16.Bit0=1 Then
CRC16=$A001^(CRC16>>1)
Else
CRC16=CRC16>>1
EndIF
Next j
Next i
Return
Tnx Salutatous I try w/other values! because there is no more info about CRC
Bookmarks