Public Function CalCRC16Fast(data() As Byte, no As Integer, btLoCRC As Byte, btHiCR
C As Byte) As String
Dim CL As Byte, CH As Byte '
多項(xiàng)式碼
&HA001
Dim SaveHi As Byte, SaveLo As Byte
Dim i As Integer
Dim Flag As Integer
btHiCRC = &HFF
btLoCRC = &HFF
CL = &H1
CH = &HA0
For i = 0 To (no - 1)
btHiCRC = btHiCRC Xor data(i) '
每一個(gè)數(shù)據(jù)與
CRC
寄存器進(jìn)行異或
Powered by 單片機(jī)教程網(wǎng)