User manual

PROFESIONAL, CREDITABLE, SUCCESSFULL DWIN DGUS v2.0 Specification
Beijing DWIN Technology Co., Ltd. - 10 - www.dwin.com.cn/en
2 Serial Port Operations
All UART LCM standard products of DWIN technology are asynchronous, full-duplex serial port (UART) mode.
Serial port mode is 8n1; i.e. each data transmission has 10bits: one initial bit, eight data bits (Least Significant Bit,
LSB) and one stop bit.
The Serial port baudrate is configured by SD card. All serial commands or data are in hexadecimal (HEX) format; for
word data (2 bytes), high byte will be adopted for transmission firstly. For example, 0x12 will be sent firstly when
0x1234 in transmission.
If module installed DGUS, BUSY Signal in previous version will be invalid, please leave it in floating.
2.1 Data Framework
The serial data frame is composed of four blocks of data as described in the following table
Data Block
1
2
3
4
5
Definitions
Frame Head
Data length
Command
Data
CRC checksum of the
command and data
Data length
2
1
1
N
2
Description
CONFIG.TXT
configuration filesR3:
RA definition.
Data length, including
command, data and
checksum
0x80-0x84
CONFIG.TXT
profileR2decide whether to
enable
2.2 Command Set
Function
Command
Data
Description
Access
control
register
0x80
ADR(0x00-0xFF)+Data_Pack
Specified address to write register data
0x81
ADR(0x00-0xFF)+RD_LEN(0x00-0xFF)
Specified address to read RD_LEN bytes of register
data
ADR(0x00-0xFF)+RD_LEN+Data_Pack
Response of DWIN Display to read register
Access
data
memory
0x82
ADR_H:L(0x0000-0x6FFF)+DATA0…DATAn
Specified address to write data string(word data) in the
variable storage area
0x83
ADR_H:L(0x0000-0x6FFF)+RD_LEN(0x00-0x7F)
Read into RD_LEN length word data start from the
specified address of the variable storage area
ADR_H:L+RD_LEN+DATA0……DATAn
Response of DWIN Display to read data storage
Write the
curve
buffer
0x84
CH_Mode(Byte)+DATA0(Word)+…+DATAn
Write the curve of the buffer data:
CH_Mode defined channel of follow-up data order:
Each bit of CH_Mode corresponds to one
channel; e.g.: CH_Mode.0 corresponds channel
0, .7 corresponds channel7
The position1 indicates the presence of the
corresponding channel data;
Data of lower channel is arranged more forward;
e.g.:CH_Mode = 0x83 (10000011B), indicates a
follow-up data format :( channel0+channel 1+
channel7) +...+ (channel 0 +channel 1+
channel7).
Access to the register with Byte as data unit, while Word in Data Storage, Curve Buffer as data unit.
For further information, please reference Chapter 1.3.