We are all lost children!
I worked out the polynominial was &H8408 and by borrowing from other examples came up with he following fast code that may be useful to anyone looking to communicate with robots etc that I believe this chip is used for.
Function CRC_Calc(CRC_Message As String) As String
Dim Polynomial16 As Long
Dim Y As Integer
Dim Char_Text_DEC As Long
Dim X As Integer
Y = 1
X = 0
CRC_Value = 0
Polynomial16 = 33800 'Polynomial &H8408
For Y = 1 To Len(CRC_Message)
CRC_Text_Single = Mid$(CRC_Message, Y, 1)
Char_Text_DEC = Asc(CRC_Text_Single)
For X = 1 To 8
LSB_CRC = CRC_Value And &H1
LSB_Char = Char_Text_DEC And &H1
If LSB_CRC = 1 And LSB_Char = 1 Or LSB_CRC = 0 And LSB_Char = 0 Then
CRC_Value = Fix(CRC_Value / 2)
Char_Text_DEC = Fix(Char_Text_DEC / 2)
ElseIf LSB_CRC = 0 And LSB_Char = 1 Or LSB_CRC = 1 And LSB_Char = 0 Then
CRC_Value = Fix(CRC_Value / 2)
Char_Text_DEC = Fix(Char_Text_DEC / 2)
CRC_Value = Polynomial16 Xor CRC_Value
Else
End If
Next X
Next Y
If Len(Hex(CRC_Value)) = 4 Then
CRC_LO = Mid$(Hex(CRC_Value), 3, 2)
CRC_HI = Mid$(Hex(CRC_Value), 1, 2)
ElseIf Len(Hex(CRC_Value)) = 3 Then
CRC_STRING = "0" & Hex(CRC_Value)
CRC_LO = Mid$(CRC_STRING, 3, 2)
CRC_HI = Mid$(CRC_STRING, 1, 2)
ElseIf Len(Hex(CRC_Value)) = 2 Then
CRC_STRING = "00" & Hex(CRC_Value)
CRC_LO = Mid$(CRC_STRING, 3, 2)
CRC_HI = Mid$(CRC_STRING, 1, 2)
ElseIf Len(Hex(CRC_Value)) = 1 Then
CRC_STRING = "000" & Hex(CRC_Value)
CRC_LO = Mid$(CRC_STRING, 3, 2)
CRC_HI = Mid$(CRC_STRING, 1, 2)
ElseIf Len(Hex(CRC_Value)) = 0 Then
CRC_LO = "00"
CRC_HI = "00"
End If
CRC_Calc = CRC_HI & CRC_LO
End Function
This gives the hex letters (EG 4A2F) but if you need asc characters to send to a comms port, replace the last line with
CRC_Calc = Chr("&h" & CRC_LO) & Chr("&h" & CRC_HI)
Also sometimes you need the checksum LSB & MSB the other way around depending on the receiving end.
The actual Send string became:-
StartCharacter & Message & CRC_Calc(Message) & StopCharacter
Eg. CRC_Calc = Chr("&h" & CRC_HI) & Chr("&h" & CRC_LO)