User Manual

CHAPTER 6: COMMAND PROTOCOLS
COBALT HF RFID CONTROLLERS OPERATOR’S MANUAL
P/N: 17-1320 REV 01 (03-06) PAGE 65 OF 116
C HECKSUM E XAMPLE
The following example depicts Command 0x05 (Read Data) using a checksum.
COMMAND
PARAMETER
CONTENTS USED IN CHECKSUM
Header 0x02, 0x02 n/a
Command Size 0x0007 0x00, 0x07
Command ID 0x05 0x05
Start Address 0x0001 0x00, 0x01
Read Length 0x0004 0x00, 0x04
Timeout Value 0x07D0 0x07, 0xD0
Checksum
0x17
n/a
Terminator 0x03 n/a
Add the byte values from the Command Size, Command ID, Start Address, Read Length
and Timeout Value parameters together and subtract from 0xFF. Resulting value will be
the checksum.
[0x07
+ 0x05 + 0x01 + 0x04 + 0x07 + 0xD0] = 0xE8
The checksum equation is: [0xFF
– 0xE8] = 0x17
Checksum =
[0xFF – (sum
of these
fields)]