Sync Bytes : the key concepts of T5A packet
LXSDF T5A packet uses initial 5 bytes for each packet transmission as “Purpose for Synchronizing Packet”. The first four bytes are allocated the fixed value 255(0xFF in hex), and fixed 254 (0xFE in hex) for fifth byte. Namely, Sync Bytes are designed only in the spots where appear 255, 255, 255, 255 and 254 sequentially in the whole packet byte arrays.
Receiving side should check each byte and extract the “Sync Bytes”, so it can find the starting spot of 1 packet. Once finding the starting spot, it is able to extract the data needed in the program under the packet Standard..
The following picture indicates that the orange color part in the one packet is assigned “Sync Bytes” and then a series of bytes for one packet.
T5A Packet Definitions
The table shows the definitions of T5A packet. Each index is one byte and transmitted in order when transmitting serial. An available value for each packet index, the terms of the packet elements.
Index | Value | Packet Element Name for Stream Mode. | Packet Element Name for Non-Stream Mode. |
0 | 255 | SyncByte0 (Synchronization Byte 0) | |
1 | 255 | SyncByte1 (Synchronization Byte 1) | |
2 | 255 | SyncByte2 (Synchronization Byte 2) | |
3 | 255 | SyncByte3 (Synchronization Byte 3) | |
4 | 254 | SyncByte4 (Synchronization Byte 4) | |
5 | 0~254 | PPD (Packet Property Data). 0~15 : Stream Mode, 16~254 : Non-Stream Mode. | |
6 | 0~255 | PCDT (PCD Type) : Bit 2,1,0. | PBS (Packet Byte Size) |
7 | 0~255 | PC (Packet Count) | IID (Information ID) |
8 | 0~255 | PCD0 (Packet Cyclic Data 0) LSByte | . |
9 | 0~255 | PCD1 (Packet Cyclic Data 1) MSByte | . |
10 | 0~253 | PCD SEP | reserved. |
11 | 0~255 | PUD0 (Packet Unit Data 0) LSByte | |
12 | 0~255 | PUD1 (Packet Unit Data 1) | |
13 | 0~255 | PUD2 (Packet Unit Data 2) | |
14 | 0~255 | PUD3 (Packet Unit Data 3) MSByte | |
15 | 0~253 | PUD SEP | reserved. |
16 | 0~255 | PSD0 (Packet Stream Data 0) LSByte | . |
17 | 0~255 | PSD1 (Packet Stream Data 1) | . |
18 | 0~255 | PSD2 (Packet Stream Data 2) | . |
19 | 0~255 | PSD3 (Packet Stream Data 3) MSByte | . |
20 | 0~253 | PSD SEP | . |
… | … | Can be repeated above 16~20 index | . |
Color | Description |
Common packet elements for both Stream Mode and Non-Stream Mode | |
Data placement for multi channel stream data. Freely expandable to any number of channels. The typical example of the multi channel stream data is the continuous output of a multi channel ADC(Analog to Digital Converter). |
Difference between Stream & Non-Stream Mode
Packet Index | Stream Mode | Non-Stream Mode |
5 | PPD : available value 0 ~ 15 | PPD : available value 16 ~ 254 |
6 | PCDT : Packet Cyclic Data Type. | PBS : Packet Byte Size allocated. |
7 | PC : +1 for each packet. | IID : Information ID allocated. |
8 ~ 10 | PCD0,1,PCD SEP : PCD data is allocated each PC. | general data allocated. |
11 ~ 15 | PUD0,1,2,3, PUD SEP : Packet Unit Data. | general data allocated. |
16 and over | PSD : real time stream data allocated. | general data allocated. |
Packet Byte Size
- Stream Mode : Predefined fixed value. ex. 16, 32, …, etc depends on applications.
- Non-Stream Mode : Determined by packet index 6( PBS ) per each packet.