NEC UN552S External Controls - Page 12
Header, Message, Check, Delimiter, Reserved, Destination, Address, Source, Message length, OP code,
View all NEC UN552S manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 12 highlights
4.3 Check code Header Message Check code Delimiter Check code is the Block Check Code (BCC) between the Header and the End of Message except SOH. SOH Reserved Destination Source Type Length(H) Length(L) STX Data | | ETX Check code 27 26 25 24 23 22 21 20 D0 D1 D2 D3 D4 D5 D6 D7 D8 | | Dn Dn+1 P P P P P P P P Dn+1 = D1 XOR D2 XOR D3 XOR ,,, Dn XOR: Exclusive OR Following is an example of a Check code (BCC) calculation. SOH Reserved Destination Address Header Source Message Address type 01 30 41 30 45 D0 D1 D2 D3 D4 Message length 30 41 D5 D6 Message STX OP code OP code page Set Value Check Delimiter ETX code (BCC) 02 30 30 31 30 30 30 36 34 03 77 0D D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 Check code (BCC) D17 = D1 xor D2 xor D3 xor ... xor D14 xor D15 xor D16 = 30h xor 41h xor 30h xor 45h xor 30h xor 41h xor 02h xor 30h xor 30h xor 31h xor 30h xor 30h xor 30h xor 36h xor 34h xor 03h = 77h (12/145)