Manual

PNI Sensor Corporation DOC#1014688 r06
TCM User Manual July 2013 Page 36
7 Operation with PNI Binary Protocol
The TCM utilizes a binary communication protocol, where the communication parameters
should be configured as follows:
Table 7-1: UART Configuration
Parameter
Value
Number of Data Bits
8
Start Bits
1
Stop Bits
1
Parity
none
7.1 Datagram Structure
The data structure is shown below:
ByteCount
(UInt16)
Packet Frame
(1 - 4092 UInt8)
CRC-16
(UInt16)
Payload
(1 - 4091 UInt8)
Frame
ID
(UInt8)
Figure 7-1: Datagram Structure
The ByteCount is the total number of bytes in the packet including the CRC-16 checksum.
CRC-16 is calculated starting from the ByteCount to the last byte of the Packet Frame. The
ByteCount and CRC-16 are always transmitted in big Endian. Two examples follow.
Example: The complete packet for the kGetModInfo command, which has no payload is:
Example: Below is a complete sample packet to start a 2D Calibration (kStartCal):
00 09
Frame ID
0A
ByteCount
00 00
CalOption
CalOption
(2D Calibration)
00 14
5C F9
Checksum
00 05
Frame ID
01
ByteCount
EF D4
Checksum