一段HEX数据 得到两字节校验码(不占数据位)
需要知道校验码的计算方法
仔细看还是有一定规率的,开始以为是CRC16 后来用菜农的工具测试了下,应该不是CRC16,求解
参考数据如下:
数据 校验值
00 00 00 00 00 00 00 00 00 00
01 02 03 04 05 06 07 08 3D 60
01 01 01 01 01 01 01 01 74 E1
02 02 02 02 02 02 02 02 E9 C2
FF FF FF FF FF FF FF FF 33 30
数据 校验值
00 00 00 00 00 00 00 01 D1 01
00 00 00 00 00 00 00 02 E2 01
00 00 00 00 00 00 00 03 33 00
00 00 00 00 00 00 00 04 84 01
00 00 00 00 00 00 00 05 55 00
00 00 00 00 00 00 00 06 66 00
00 00 00 00 00 00 00 07 B7 01
00 00 00 00 00 00 00 08 48 01
00 00 00 00 00 00 00 09 99 00
00 00 00 00 00 00 00 0A AA 00
00 00 00 00 00 00 00 0B 7B 01
00 00 00 00 00 00 00 0C CC 00
00 00 00 00 00 00 00 0D 1D 01
00 00 00 00 00 00 00 0E 2E 01
00 00 00 00 00 00 00 0F FF 00
数据 校验值
00 00 00 00 00 00 01 00 C0 3D
00 00 00 00 00 00 02 00 C0 79
00 00 00 00 00 00 03 00 00 44
00 00 00 00 00 00 04 00 C0 F1
00 00 00 00 00 00 05 00 00 CC
00 00 00 00 00 00 06 00 00 88
00 00 00 00 00 00 07 00 C0 B5
00 00 00 00 00 00 08 00 C1 E1
00 00 00 00 00 00 09 00 01 DC
00 00 00 00 00 00 0A 00 01 98
00 00 00 00 00 00 0B 00 C1 A5
00 00 00 00 00 00 0C 00 01 10
00 00 00 00 00 00 0D 00 C1 2D
00 00 00 00 00 00 0E 00 C1 69
00 00 00 00 00 00 0F 00 05 54
数据 校验值
00 00 00 00 00 01 00 00 FC 01
00 00 00 00 00 02 00 00 B8 01
00 00 00 00 00 03 00 00 44 00
00 00 00 00 00 04 00 00 30 01
00 00 00 00 00 05 00 00 CC 00
00 00 00 00 00 06 00 00 88 00
00 00 00 00 00 07 00 00 74 01
00 00 00 00 00 08 00 00 60 02
00 00 00 00 00 09 00 00 9C 03
00 00 00 00 00 0A 00 00 D8 03
00 00 00 00 00 0B 00 00 24 02
00 00 00 00 00 0C 00 00 50 03
00 00 00 00 00 0D 00 00 AC 02
00 00 00 00 00 0E 00 00 E8 02
00 00 00 00 00 0F 00 00 14 03
数据 校验值
00 00 00 00 01 00 00 00 C0 51
00 00 00 00 02 00 00 00 C0 A1
00 00 00 00 03 00 00 00 00 F0
00 00 00 00 04 00 00 00 CA 41
00 00 00 00 05 00 00 00 01 10
00 00 00 00 06 00 00 00 01 E0
00 00 00 00 07 00 00 00 C1 B1
00 00 00 00 08 00 00 00 C2 81
00 00 00 00 09 00 00 00 02 D0
00 00 00 00 0A 00 00 00 02 20
00 00 00 00 0B 00 00 00 C2 71
00 00 00 00 0C 00 00 00 03 C0
00 00 00 00 0D 00 00 00 C3 91
00 00 00 00 0E 00 00 00 C3 61
00 00 00 00 0F 00 00 00 03 30
数据 校验值
01 00 00 00 00 00 00 00 C010
02 00 00 00 00 00 00 00 C023
03 00 00 00 00 00 00 00 0033
04 00 00 00 00 00 00 00 C045
0A 00 00 00 00 00 00 00 00AA
0B 00 00 00 00 00 00 00 C0BA
0C 00 00 00 00 00 00 00 00CC
0D 00 00 00 00 00 00 00 C0DC
数据 校验值
00 00 00 00 00 00 01 01 113C
00 00 00 00 00 00 02 02 2278
00 00 00 00 00 00 03 03 3344
00 00 00 00 00 00 04 04 44F0
00 00 00 00 00 00 0A 0A AB98
00 00 00 00 00 00 0B 0B BAA4
00 00 00 00 00 00 0C 0C CD10
00 00 00 00 00 00 0D 0D DC2C
|