Home

TGUS UART screen adopts asynchronous, full-duplex serial port (UART), serial port mode for 8n1 (51 SCM Mod1,9bit UART), that is, each data transmission adopts 10 bits: 1 start bit, 8 data bits, 1 stop bit.


All the instructions or data of the serial port are Hexadecimal, for multi-byte data, taking the high byte in the front (MSB), for example, sending 0x12345678, then sending the 0x12 0x34 0x56 0x78 in turn, that is, big endian mode.

 

Definition

Frame Header

Data Length

Command

Initial Address

Data

CRC Check of the Instruction and Data

Data Length

(Byte)

2

1

1

1/2/4

N

2

Description

R3:RA definition of CONFIG.TXT configuration file, default 5A A5

Data length includes instruction, data and check

0x80-0x84

Byte will change because of instruction

Read /Write data

CONFIG.TXT decides whether to enable configuration file R2.4

Example

5A  A5

04

80

00

0001


Example

5A  A5

05

82

0000

0001


Data Length = Command+ Initial Address+ Data+ CRC Check of the Instruction and Data  

Instruction Frame Header:

For double-bytes. The user can customize (register R3,RA) its content. The user can realize parallel application of multiple TGUS screen by setting different frame head.


CRC Check:

Does not include frame header and data length, only for instruction and data, check sample code is shown in Appendix 1.

When CRC frame Check response (R2.4=1 RC.3=1) is enabled, the TGUS screen automatically responds to the check situation after CRC check:

(frame header +02+ command + data (0xFF means CRC check is correct,0x00 means CRC check is error) +CRC)