A-1.5 crc byte – Zigen HX-44 User Manual
Page 31
Matrix Switching System—User Manual
30
A-1.5 CRC Byte
CRC Byte (CB)
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
CB
CRC (cyclic redundancy check)
CRC: Host must send CRC code to follow the last byte.
Table
– CRC Table
00
01
02
03
04
05
06
07
08
09
0A 0B 0C 0D 0E 0F
00
00
5E BC E2 61
3F DD 83
C2 9C 7E 20
A3 FD 1F 41
10
9D C3 21
7F FC A2 40
1E 5F 01
E3 BD 3E 60
82
DC
20
23
7D 9F C1 42
1C FE A0 E1 BF 5D 03
80
DE 3C 62
30
BE E0 02
5C DF 81
63
3D 7C 22
C0 9E 1D 43
A1 FF
40
46
18
FA A4 27
79
9B C5 84
DA 38
66
E5 BB 59
07
50
DB 85
67
39
BA E4 06
58
19
47
A5 FB 78
26
C4 9A
60
65
3B D9 87
04
5A B8 E6 A7 F9 1B 45
C6 98
7A 24
70
F8 A6 44
1A 99
C7 25
7B 3A 64
86
D8 5B 05
E7 B9
80
8C D2 30
6E ED B3 51
0F 4E 10
F2 AC 2F 71
93
CD
90
11
4F AD F3 70
2E CC 92
D3 8D 6F 31
B2 EC 0E 50
A0 AF F1 13
4D CE 90
72
2C 6D 33
D1 8F 0C 52
B0 EE
B0 32
6C 8E D0 53
0D EF B1 F0 AE 4C 12
91
CF 2D 73
C0 CA 94
76
28
AB F5 17
49
08
56
B4 EA 69
37
D5 8B
D0 57
09
EB B5 36
68
8A D4 95
CB 29
77
F4 AA 48
16
E0 E9 B7 55
0B 88
D6 34
6A 2B 75
97
C9 4A 14
F6 A8
F0 74
2A C8 96
15
4B A9 F7 B6 E8 0A 54
D7 89
6B 35
Example: switch output 6 to the input 3.
Byte 1 (DB) is 0x20
– Device: Identifier + Device ID = 0x20 + 0 = 0x20
Byte 2 (RB) is 0x01
– Request: Switch Video Output Channel = 0x01
Byte 3 (IB) is 0x06
– Index: Output 6 = 6
Byte 4 (VB) is 0x03
– Value: Input 3 = 3
Byte 5 (CB) is 0x93
– CRC code from Byte 1 to Byte 4. (CRC4)
CRC Calculation
CRC 0 = 0 (initial value)
CRC 1 = CRC_ TABLE [CRC 0 ^ Byte 1] = CRC_ TABLE [0x00 ^ 0x20] = 0x23
CRC 2 = CRC_ TABLE [CRC 1 ^ Byte 2] = CRC_ TABLE [0x23 ^ 0x01] = 0x9F
CRC 3 = CRC_ TABLE [CRC 2 ^ Byte 3] = CRC_ TABLE [0x9F ^ 0x06] = 0x8D
CRC 4 = CRC_ TABLE [CRC 3 ^ Byte 4] = CRC_ TABLE [0x8D ^ 0x03] = 0x93