The Config.txt file describes the parameter register in a script-like language, each row describes a parameter, and the unused parameters can not be written, as shown in the following table:
Hardware Register Name | Value Range | Description |
R1 | 0x00-0x11 | Baud rate setting |
R2 | 0x00-0xFF | Software operation mode configuration register |
R3 | 0x00-0xFF | Serial port communication frame header, high byte |
R4 | - | Preserve, do not use |
R5 | Indefinite | When R1=0x11, the high byte of baud rate configuration |
R6 | 0x00-0x40 | After the touch screen control backlight started, click touch screen backlight to light up the brightness |
R7 | 0x00-0x40 | After the touch screen control backlight started, do not click the touch screen for a period of time, the brightness of backlight off. |
R8 | 0x01-0xFF | After the touch screen control backlight started, the touch screen backlight lights up the time, unit is 1.0 second |
R9 | Indefinite | When R1=0x11,the low byte of baud rate configuration. |
RA | 0x00-0xFF | Serial port communication frame header, low byte |
RC | indefinite | AUX_CFG configures word, definite it by bit, and will explain it later |
The parameter of configuration file is 1bit hex mode, for example, 0A express decimal 10. Configuration parameter must be 2bit, for example,00 can’t be written into 0. |
a) R1、R5、R9 Serial Port Baud Rate Settings Related R1,R5,R9
When the R1 value is between 00-10, R5 and R9 are invalid, and 17 different baud rates can be selected.
Unit is Kbps:
R1 | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | 10 |
baud-rates | 1.2 | 2.4 | 4.8 | 9.6 | 19.2 | 38.4 | 57.6 | 115.2 | 28.8 | 76.8 | 62.5 | 125 | 250 | 230.4 | 345.6 | 691.2 | 921.6 |
If the value of R1 is 0x11, the baud rate is determined by R5 and R9, and the specific calculation method is as follows: R5:R9= 6250000/baud rate, R5:R9 represents a double byte parameter, R5 is high byte, R9 is low byte. The UART screen default baud rate is 115200bps.
b) Software Working Mode Configuration Register R2
The R2 registers are used to configure the working mode of the software, the meaning of the each bit is as follows:
Byte | Data | Definition | Description |
.7 | 0x80 | VDS | 0=Normal display 1=Deflect 90°to display |
.6 | 0x40 | HDS | 0=Normal display 1=Deflect 180°(reverse perspective)to display |
.5 | 0x20 | TP_LED | 0=Backlight is not controlled by touch screen states 1=Backlight is controlled by touch screen ,control parameter register is set by R6, R7, R8 register |
.4 | 0x10 | FCRC | 0=Not enable the CRC16 frame check of serial port communication 1=Enable the CRC16frame check of serial port communication |
.3 | 0x08 | TPSAUTO | 0=Do not upload automatically After inputting parameter in touch screen (User query) 1=Whether it automatically upload to the serial port after inputting parameter in touch screen is decided by the configuration of the corresponding touch control variable |
.2 | 0x04 | L22_Init_En | 0=The 56KB variable memory power on initial data is0x00 1=The 56KB variable memory power on initial data is loaded by 22 font file. |
.1 | 0x02 | FRS1 | Set TGUS period, the smaller TGUS period, the more sensitive the variable response, but the less ability deal with the variable Period | 80mS | 120mS | 160mS | 200mS | FRS1 | 1 | 1 | 0 | 0 | FRS0 | 1 | 0 | 1 | 0 |
|
.0 | 0x01 | FRS0 |

Note: Partial models do not support this situation of HDS=1
c) R3、RA Serial Port Communication Frame Header
The serial port data frame of serial port screen is made of 5 data blocks, as the following table:
Data Block | 1 | 2 | 3 | 4 | 5 |
Definition | Frame Header | Data Length | Instruction | Data | Command and Data CRC Check |
Data Length | 2 | 1 | 1 | N | 2 |
Description | R3:RA definition | Data length includes instruction, data and check | 0x80-0x84 |
| R2 decision |
The settings of communication frame is mainly achieve the following two purposes:
ØUsed for the identification and synchronization of the serial port data frame;
ØWhen multiple TGUS screens work in parallel, the frame header is distinguished as the device address;
If set R3=AA , RA=BB, then the serial port command must begin with 0xAA 0xBB (for example, read register instruction AA BB 03 81 00 10), the Serial screen will receive.
d) Touch Backlight Control R6.R7.R8.R2_TP_LED.
When the R2_TP_LED is set as the backlight and controlled by the touch screen state.
Register | The value range | Description |
R6 | 0x00-0x40 | After the touch screen control backlight is started, clicking the touch screen backlight to turn on brightness. |
R7 | 0x00-0x40 | After the touch screen control backlight is started, the backlight will turn off the brightness if user do not click the touch screen after a while |
R8 | 0x01-0xFF | After the touch screen control backlight is started, touch screen backlight turn on time, the unit is 1 second. |
Serial port screen ex-factory communication frame head preset R3=5A RA=A5, frame head is 0x5A A5, no CRC check.