T5L - DGUSII Application Development Guide
T5L - DGUSII Application Development Guide
Version 1.0
DWIN Technologies
2020/2/10
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
DWIN Technologies provides this document to its customers with a product purchase to use in the product
operation. This document is copyright protected and any reproduction of the whole or any part of this document is
strictly prohibited, except with the written authorization of DWIN Technologies Limited.
The contents of this document are subject to change without notice. All technical information in this document is
for reference purposes only. System configurations and specifications in this document supersede all previous
DWIN Technologies Limited makes no representations that this document is complete, accurate or error-free and
assumes no responsibility and will not be liable for any errors, omissions, damage or loss that might result from
any use of this document, even if the information in the document is followed properly.
This document is not part of any sales contract between DWIN Technologies Limited and a purchaser. This
document shall in no way govern or modify any Terms and Conditions of Sale, which Terms and Conditions of
Sale shall govern all conflicting information between the two documents.
I
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
Contents
1 Introduction.............................................................................................................................................................................. 1
1.1 Overview.......................................................................................................................................................................1
1.2 Naming Rule................................................................................................................................................................ 1
1.3 T5L_DGUSII Development System......................................................................................................................... 2
1.4 Information and Caution Statements....................................................................................................................... 3
2 Hardware..................................................................................................................................................................................4
2.1 Processing Core..........................................................................................................................................................4
2.2 Power............................................................................................................................................................................ 6
2.3 Interface Definition and Wiring..................................................................................................................................7
2.4 SD Interface................................................................................................................................................................. 9
2.5 Buzzer......................................................................................................................................................................... 10
2.6 Audio Output.............................................................................................................................................................. 10
2.7 Serial Port Tool.......................................................................................................................................................... 10
3 Firmware Structure...............................................................................................................................................................12
3.1 Software Processing Flow....................................................................................................................................... 12
3.2 Memory Spaces.........................................................................................................................................................12
3.2.1 FLASH Space.................................................................................................................................................12
3.2.2 RAM Space.....................................................................................................................................................14
3.3 File Structure..............................................................................................................................................................14
4 System Configuration...........................................................................................................................................................16
4.1 Configuration List...................................................................................................................................................... 16
4.2 Hardware Parameter................................................................................................................................................ 18
4.3 Backlight..................................................................................................................................................................... 19
4.4 ICL File Save Position.............................................................................................................................................. 20
4.5 Baud Rate...................................................................................................................................................................20
4.6 Display........................................................................................................................................................................ 21
4.7 Sensitivity....................................................................................................................................................................22
4.8 Buzzer......................................................................................................................................................................... 22
4.9 Touch Calibration.......................................................................................................................................................23
5 System Variable Interface................................................................................................................................................... 26
5.1 System Variable Interface........................................................................................................................................26
5.2 Network Interface...................................................................................................................................................... 34
6 Serial Communication Protocol..........................................................................................................................................40
6.1 Introduction.................................................................................................................................................................40
6.2 Control Register Commands...................................................................................................................................40
6.2.1 Write Register(0x80)..................................................................................................................................... 40
6.2.2 Read Registers(0x81)................................................................................................................................... 41
6.3 VP (RAM) Commands..............................................................................................................................................42
6.3.1 Write VPs (0x82)............................................................................................................................................42
6.3.2 Read VPs (0x83)........................................................................................................................................... 43
6.4 CRC............................................................................................................................................................................. 44
7 Interface Objects...................................................................................................................................................................47
II
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
III
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
1 Introduction
1.1 Overview
This document provides a general overview of T5L firmware for DWIN smart LCMs, its features and utilities,
instructions on how to use it, and descriptions of all functionalities. It assumes the user has basic prior knowledge
about microcontroller or computer programming and binary and hexadecimal numeric representations.
If you are a new user of DWIN smart LCMs, we recommend reading this document sequentially, from start to end.
However, this document’s sections are structured to be used as a reference guide, where you can look for
Knowing this rule will make it easier to learn about DWIN smart LCMs.
Product line code DM DWIN smart LCM product line
Color code 1 character B=single color D=256 color T=65K color G=16.7M color
32240=320*240 48270=480*272 64480=640*480 80480=800*480
85480=854*480 80600=800*600 10600=1024*600 10768=1024*768
Resolution 5 digits
12720=1280*720 12800=1280*800 13768=1364*768 or 1366*768
19108=1920*1080
L=simple application grade C=commerce grade T=industrial grade K=medical grade
Classification 1 character
Q=automotive grade S=military grade
022=2.2inch 024=2.4inch 028=2.8inch 035=3.5inch 040=4.0inch
043=4.3inch 047=4.7inch 050=5.0inch 056=5.6inch 057=5.7inch
Size 3 digits 064=6.4inch 070=7.0inch 080=8.0inch 084=8.4inch 090=9.0inch
097=9.7inch 101=10.1inch 104=10.4inch 121=12.1inch 150=15.0inch
156=15.6inch 185=18.5inch
_ _ Separator
0=basic type
1=basic type with a shell
1 digit or
Attribute code 2=Simulate video processing platform products
character
3=Android platform products
4=Digital video processing platform products
For example, DMG48270C043_03WTR is a 4.3 inch, 480*272 resolution, commercial grade T5L smart LCM with
resistance touch panel.
DGUS development system is composed of DGUS screen and DGUS development software. DGUS is the
abbreviation of DWIN Graphic Utilized Software. DGUS screen is based on configuration file to work, so the
whole development process is the process that users complete variable configuration file with the help of PC
Users can make a table before the project, frame and plan the required variable address to facilitate the
The simple interface can be made by yourself; the complex or beautiful interface can be made by professional
The interface is configured by T5L_DGUSII software on the PC side. After completing the project, click "save" and
"generate" in the "file" option in the upper left corner of the software to generate 13. Bin touch configuration file,
14. Bin display configuration file and 22. Bin variable initialization file.
(4) Debugging
Put the required files into the DWIN_SET folder and download them to the screen through SD card. The
sequence is: power off – insert SD card - power on - blue screen reading SD card content, download complete
display "SD card process END! " ——Power off, exit SD card - power on.
After finalizing the version, put the configuration files, picture files, icons, fonts, etc. into the DWIN_SET folder,
The information in caution and warning statements is provided for your protection. Read each caution and
warning statement carefully.
2 Hardware
This section describes the hardware (physical) components of a DWIN Liquid Crystal Module (DWIN LCM), and
As shown in the figure 2.1. The T5L series ASIC is a single-chip and dual-core ASIC IC designed by DWIN
technology co., ltd for AIOT applications with low power consumption, high cost performance, GUI and highly
integrated application, including T5L1(low resolution) and T5L2(high resolution). Its main features are as follow:
(1) Using 8051 core which is the most widely used, mature and stable, the maximum operating frequency of T5L
High-speed display memory, 2.4 GB/S bandwidth, 24bit color display resolution supporting to 800*600(T5L1)
or 1366*768(T5L2).
with animation and icons as its main feature is extremely cool and smooth.
JPEG stores images and icons in compressed mode, external memory greatly reduced to low-cost 16Mbytes
SPI Flash.
With maximum 400 Hz touch point speed, touch screen supports resistance or capacitance, and its
128Kbytes variable storage space, exchanging data with OS CPU Core using memory interface, extremely
simple to apply.
2-way 10bit, 800KHz, DC/DC controller, simplify LED backlight, analog power supply design and save cost
and space.
1-way 15bit32Ksps PWM digital power amplifier driver loudspeaker, save power amplifier cost and achieve
(3) Separated CPU (OS CPU) core runs user 8051 code or DWIN OS system, user CPU is omitted in practical
application.
Standard 8051 architecture and instruction set, 64Kbytes code space, 32Kbytes on-chip RAM.
64 bit integer mathematical operation unit (MDU), including 64 bit MAC and 64 bit divider.
Built-in software WDT, three 16 bit Timers, 12 interrupt signals with the highest four interrupt nesting.
22 IO, 4-channel UARTS,1-channel CAN interface, up to 8-channel 12-bit A/D, 1-channle 16-bit resolution
adjustable PWM.
(4) 1Mbytes on-chip Flash with DWIN patent encryption technology ensure code and data security, eliminate
(5) Reduces crystal requirements and PCB design challenges for a variety of inexpensive wide-range tuned
(7) Supporting SD interface or UART1 download and configuration, supporting SD card file reading and rewriting.
(8) Supporting DWIN WiFi module to access to DWIN cloud directly, and easily developing various cloud platform
applications.
(9) Working temperature ranges from - 40℃ to +85℃ (Customizable IC for -55℃ to 105℃ operating temperature
range )
(10) With low power consumption and strong anti-interference ability, it can work steadily on the double-sided
(11) Using 0.4 mm ELQFP128 packaging, low manufacturing difficulty and low cost.
(12) Providing T5L IC + LCD + touch screen + design support for industry customers with cost-effective matching
2.2 Power
Confirm the screen voltage and power consumption according to the selection manual or data manual, lit up the
screen by a 5v/12v/24v DC regulated supply. The power supply plays a very important role in the normal display
of the screen. Too-low voltage, instable current or too-low power may lead to flashing screen, black screen and
Info
②PCB pins of the same defined pins have been connected in parallel.
T5L DGUS products are equipped with extended serial port, and it is UART4, and its configuration and
communication need to be completed through DWIN OS program. In the serial instruction set mode, only serial 2
communication is available. Other non-serial 2 communication has no open function for the time being.
⑤In order to improve baud rate and facilitate connection to PC debugging, Some models of DWIN adopt
TTL/RS232 compatible interface. Users can use 0Ωresistor or solder to directly short circuit. R232=0 (short
circuit) selects TTL level input; R232=1(disconnect), selects RS232 level. As shown in figure 1.0, the place is
marked by white silk screen. By default, the factory disconnects the 232 level, and selects the TTL level. That is
OFF=232, ON=TTL.
As shown in the figure 2.3. One-end of the different side FCC row line is connected to terminal block of the
screen, and the other end is connected to the DWIN HDL662B adapter board, both blue side face up. One-end of
the double-male USB cable is connected to the adapter board, and the other end is connected to the computer for
communication.
2.4 SD Interface
All hardware parameter settings and data of T5L display terminal can be completed through SD / TF card
SD cards sold by non DWIN factories often have to be formatted under DOS system. Otherwise, the download
phenomenon is usually just that the number of downloaded files is 0 after the blue screen, or the display terminal
fails to recognize that the card cannot enter the download interface normally. Format as follows:
Step 1: start 》 run 》 enter command (enter CMD for win7 system) to enter DOS system;
Step 2: input the command: format / q g: / fs: fat32 / a: 4096 (Note: q is followed by a space). Click enter after
input.
Where g is the disk number of SD card displayed on the user's computer, and the corresponding disk number of
Note: the format operation after right clicking SD card cannot be completely formatted into
Info
FAT32 format. Generally, only SD card with size range of 1-16g is supported.
2.5 Buzzer
The built-in buzzer provides audible feedback for the user when they touch a button on the Screen.
Some LCM models have an audio output connector for speakers, to play audio files stored in memory
All DWIN LCMs have one or more connectors for Serial Communication with external controllers.
There are XR21V1410 and CP2102 chips in the USB to UART chip of DWIN serial port adapter board. According
to the chip type, you can download the corresponding driver on DWIN official website or consult 400 technical
3 Firmware Structure
In the T5L_DGUS II development platform, the configuration of touch operation of touch screen is also stored in
13. Bin file in the same way. The characteristic attributes of variables (characters, data), various animations and
other functions to be displayed are represented by codes and stored in 14. Bin file according to the address. The
operation in the development software of DGUS II is to configure the control of display function or touch function.
When the system is powered to run, the system will call 13. Bin file and 14. Bin file, so that the human-computer
16MB flash memory can be regarded as divided into 64 subspaces with fixed capacity of 256KB, and the file ID
need be stored ranges from 0 to 63. According to the different contents of the stored files, the memory is mainly
(1) 4-12MB font space can save BIN, HZK, ZK format files, file ID is from 00 to 47.
(2) 4-12MB picture space can save ICL files of background picture library and ICL files of icon library. The file ID is
from 16 to 63.
Note that there are overlaps between the font space and the image space, therefore you
Info
should avoid conflicts when naming ID.
For the T5L1 CPU platform, the size of a single picture file in the packed ICL file should not exceed 256KB, and
that in the T5L2 CPU platform should not exceed 768KB.The download file must be placed in the DWIN_SET
folder of the SD card root directory, which must be a 4KB sector, FAT32 format SD or SDHC card.
The RAM space is fixed at 128KB and divided into 0x0000-0xffff subspaces. Each variable address corresponds
to 2 bytes, and each byte corresponds to 8 bits of the corresponding space. 0x0000-0x0FFF is the address space
of system variable interface, which can not be customized by users; 0x1000-0xFFFF variable storage space can
If the 8-channel curve is used at the same time, 0x1000-0x4FFF will be used as the buffer address of the curve.
At this time, the variable address of this part cannot be used by other control, and the addresses range of other
control is 0x5000-0xFFFF.
The following table describes the file types and naming rules accepted by DGUSII platform.
The serial screen SD/SDHC interface based on T5L supports downloading and updating of the
Caution following files. SD card upgrade does not support online hot plug-in update. You must first power
off the screen, insert SD card, and then power on to download.
4 System Configuration
T5L CFG *. CFG hardware configuration file is in binary data format and can be edited by software such as
0x14 1 H_W
0x15 1 H_S
0x16 2 H_D Horizontal (X direction) resolution
0x18 1 H_E
0x19 1 V_W
0x1A 1 V_S
0x1B 2 V_D Vertical (Y) resolution
0x1D 1 V_E
0x1E 1 TCON_SEL 0x00= do not need to configure TCON 。
0x1F Reserved Write 0x00
0x5A= Enable the configuration. It has been configured at the
0x20 TP_Set_En
factory. Users do not need to configure it again
Touch screen mode configuration
.7-.4(high 4bit)type selection.
0x0*= Resistance touch screen
0x1*= Capacitance touch screen derived by GT911,
GT9271 or GT9110 IC
0x2*=ILI9881H Incell CTP
.3 Resistance touch screen calibration: 0=off 1=on, enable when
0x21 1 TP_Mode
SD card downloading is in process
TP .2-.0 (low 3bit) Coordinate setting:
For example, hardware parameter configuration specification in CFG configuration file at address 0x05.
①For example: set the initial value of power on display, automatically upload the touch data, turn on the touch
screen sound, turn off the backlight, and configure the display direction at 0 °.
Here, 1 byte corresponds to 8 bits, and each bit corresponds to two states: on and off. The corresponding bit is
enabled to write 1 and off to write 0. Convert the binary 0011 1000 to hexadecimal 0x38, write the address of the
CFG file 0x05 to 0x38, and download the CFG file to complete the corresponding configuration.
The 7th bit of address 0x05 is configured as 1, which means CRC verification is enabled.
Setting value of DMG10600C070-03W (Horizontal display screen series) in CFG file at different display direction
Setting value of DMG85480C050-03W (Vertical display screen series) in CFG file at different display direction
④Audio play
The address 0x07 is used to set the music saving position. The name of the audio file should be the same as the
setting value.
4.3 Backlight
Note: After the backlight standby screen protection is turned on, the first click on the touch
Info
screen will wake up the backlight, and the second click will trigger the touch control.
If the picture background file is set to 32_picture. ICL file, 0x20 needs to be written in the address of CFG file 0x08
If it is a named other value, 0x08 needs to be set to the corresponding value, such as 33 _background picture,
Formula: Baud rate setting value =3225600/ setted baud rate. The maximum value is 0x03FF.
E.g.: set baud rate:115200, baud rate setting value=3225600/115200=28, the hexadecimal number which 28 is
converted to is 0x1C, As the baud rate address is 2 bytes, CFG file 0x0A address can start writing 0x001C. The
4.6 Display
Display configuration mode. Touch configuration mode is factory configured. Under normal circumstances, users
do not need to configure. In case of scrolling, reverse touch or white screen during configuration, you can try to
0x10, 0x11 write 0x5A A5 to indicate that 0x12-0x1F parameter will take effect, and 0x00 00 to indicate that it will
2.4_240*320(IPS) 01 26 0A 14 00 F0 0A 02 02 01 40 02 05 00
2.8_240*320A 01 26 0A 14 00 F0 0A 02 02 01 40 02 03 00
2.8_240*320B 01 20 10 20 00 F0 20 02 0E 01 40 08 01 00
3.5_320*240 01 1C 1E 14 01 40 40 03 0F 00 F0 10 02 00
3.5_320*480 01 14 0A 04 01 40 0A 02 02 01 E0 02 04 00
3.5_320*480(IPS) 01 14 0A 04 01 40 0A 02 02 01 E0 02 06 00
3.5_480*640 01 0A 10 20 01 E0 20 02 03 02 80 02 07 00
4.0_480*480(IPS) 00 0E 08 08 01 E0 08 02 0C 01 E0 06 08 00
4.0_480*800(IPS) 00 08 08 08 01 E0 08 04 0A 03 20 0A 09 00
4.0_720*720(IPS Incell) 00 03 70 B4 02 D0 B4 02 14 02 D0 DC 0A 00
5.0_720*1280(IPS Incell) 00 03 04 14 02 D0 14 02 12 05 00 C8 0A 00
5.0_480*854(IPS) 00 08 08 08 01 E0 08 02 0C 03 56 06 0C 00
480*272 01 16 29 02 01 E0 02 0A 02 01 10 02 00 00
640*480 01 08 1E 72 02 58 10 03 20 01 E0 0A 00 00
800*480 01 06 1E 10 03 20 D2 03 14 01 E0 0C 00 00
800*600 01 05 1E 10 03 20 D2 03 14 02 58 0C 00 00
1024*600 01 04 A0 88 04 00 18 06 1D 02 58 03 00 00
1024*768 01 04 10 40 04 00 20 04 08 03 00 04 00 00
1280*720 01 03 10 40 05 00 20 08 20 02 D0 20 00 00
1280*800 01 03 10 1C 05 00 10 08 10 03 20 10 00 00
1366*768 01 03 10 20 05 54 20 06 10 03 00 08 00 00
1366*768 eDP 00 03 10 20 05 54 20 06 10 03 00 08 10 00
1024*768 VGA 00 03 88 A0 04 00 18 06 1D 03 00 03 00 00
1280*800 VGA 00 03 80 C8 05 00 48 06 16 03 20 03 00 00
4.7 Sensitivity
Sensitivity address is 0x22, by default the value is set to 0x14, the range is from 0x0000 to 0x1F. Address 0x20 is
set to 0x5A.
4.8 Buzzer
The buzzer can be configured through the CFG file. Adjusting the duty cycle of the position 0x2B of the CFG file
can change the size of the buzzer's sound. The larger the duty cycle is, the louder the sound is. Adjust the 0x2D
The product calibration methods of T5L TA and DGUS are the same. During the switch between TA instruction set
development mode and DGUS development mode, touch drift may occur occasionally. At this time, it can also be
calibrated as follows.
Here, take the DGUSII screen DMG48480C040_03WTR as an example, edit the address data of the CFG file
Set 0x21.7 and 0x21.3 to 1 and download it to T5L screen to achieve touch calibration.
Caution Then download the CFG file to the screen, and carry out step 2 under the condition of
Click the "top left corner, top right corner, bottom right corner and bottom left corner" of the touch screen
successively with sharp objects, and some screens will display red pixel points to indicate that the calibration is
completed.
T5L touch screen standard configuration reference DMG80480L070_01 WTR and DMG80480L080_01WTR only
have resistance touch, the factory kernel is the TA instruction set development mode, and the other models are all
DMG12720C050-03WTC and DMG72720C041-03WTC are Incell capacitive touch, LCD IPS all-in one screen.
E.g:
5A A5 04 83 000F 01 return: 5A A5 06 83 000F 01 27 21 (27 is GUI software
version, 21 is DWIN OS software version)
Application :
(1)When using a display terminal, due to the control system, display
terminal start time inconsistent (depending on the user's power supply
capacity and electricity rate), to ensure that the control system of a start
sending data display terminal received correctly and carry out the
corresponding functions and commands, so need to confirm whether the
display terminal has the normal operation, the user can be identified by this
directive;
(2)In the process of debugging need to know whether the system version,
configuration and so on is correct, you can also send this instruction to read.
(3)The transmission and response of this command is often used to verify
that the communication between the computer serial port and the serial
screen is normal.
D7=Year (0-0x63) D6=month(0-0x0C), D5=day(0-0x1F), D4=week(0-0x6),
D3=hour(0-0x17), D2=minute(0-0x3B), D1=second(0-0x3B), D0 undefined.
Data format is HEX.
If there is no RTC on hardware, user can write RTC data.
E.g.:
0x10 RTC R/W 4 Write: 5A A5 0B 82 0010 13 0A 01 00 0B 0C 0D 00
Text RTC display 2019-10-0111:12:13 SUN,
20. Automatic completion of the system; The day of the week is displayed in
English and the system will convert automatically.
Read: 5A A5 04 83 00 10 04
Answer: 5A A5 0C 83 00 10 04 13 0A 01 00 0B 0C 0D 00
Display current page ID
E.g.:
0x14 PIC_Now R 1
Read: 5A A5 04 83 0014 01
Answer: 5A A5 06 83 00 14 01 0007 (0007 is page 07)
GUI status feedback: 0x0000=free, 0x0001=processing 13.bin and 14.bin.
The operation state feedback is in millisecond unit level, which is generally
0x15 GUI_Status R 1
applied in special cases. The user can judge whether the GUI kernel is
occupied by the DWIN-OS program.
D7: 0x5A=touch screen data is updated, OS is clear.
D6: Touch panel status. 0x00=release, 0x01=first press, 0x02=lift,
0x03=pressing
D5:D4=X coordinate D3:D2=Y coordinate D1:D0=0x0000.
0x16 TP_Status 4 E.g.:
Read: 5A A5 04 83 0016 03
Answer: 5A A5 0A 83 00 16 03 5A 02 02 55 00 E5
Read the coordinates of the touch
Write: 5A A5 05 82 0016 0000 reset touch screen data update mark.
0x1A-
Reserved 23 Undefined
0x30
D1: 0x5A = VCC_Now, backlight brightness value, AD0-AD1 instant value
has updated.
D0: Current backlight brightness value, 0x00-0x64.
0x31 LED_Now R 1
E.g.:
Read: 5A A5 04 83 0031 01
Answer: 5A A5 06 83 00 31 01 5A 64
AD0-AD7 Instantaneous value of AD0-AD1, 1 word per AD. Voltage=AD
0x32 R 8
Instantaneous value value*4800/65532 mV. Hardware support is needed.
0x3A-
Reserved 64 Undefined
0x79
Horizontal resolution of the screen
E.g.:
0x7A LCD_HOR R 1
Read: 5AA5 04 83 007A 01
Answer: 5A A5 06 83 00 7A 01 01 E0 (0x01E0 is horizontal resolution)
Vertical resolution of the screen
E.g.:
0x7B LCD_VER R 1
Read:5AA5 04 83 007B 01
Answer:5A A5 06 83 00 7B 01 01 10 (0x0110 is vertical resolution)
0x7C-0x
Reserved 4 Undefined
7F
D3: 0x5A = enable the parameter configuration once, clear after operation.
D2: touch screen sensitivity configuration value, read only.
D1: touch screen mode configuration value, read only.
D0: system status setting.
.7:Serial port CRC check 0=close 1=open
.6: Buzzer / music play selection,0=Buzze 1=music play
.5: 22 File initialization variable space 1= load 0= no load, read only.
.4: variable automatic upload setting 1= on, 0= off, read and write.
.3: touch screen audio control 1= open 0= close, read and write.
.2: touch screen backlight standby control 1= open 0= close, read and write.
0x80 System_Config R/W 2
.1. 0: display orientation 00 = 0 °, 01 = 90 °, 10 =180 ° ,11 = 270 °, read and
write.
E.g.:
Read: 5A A5 04 83 0080 02
Answer: 5A A5 08 83 00 80 02 00 14 10 38
Read commands are typically used to view the screen .CFG configuration .
D0 can change the configuration. CFG file 0x05 address, for example, the
next two instructions are on the corresponding.4= 1.5 =1, touch screen
sound control off or on, can be applied to the touch button of the buzzer
"mute" function. Note: write instruction is not saved after power off.
Beijing DWIN Technology Co., Ltd 28 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
Write: 5A A5 07 82 0080 5A 00 00 30
Write: 5A A5 07 82 0080 5A 00 00 38
Set standby backlight.
D3= brightness when system running, 0x00-0x64; When backlight standby
control is off, D3 can be used for brightness adjustment via instruction.
D2= brightness when system standby, 0x00-0x64; D1:0=wait time /5 ms.
E.g.:
1. When CFG address 0x05 is configured to turn on backlight standby
control of touch screen:
5A A5 07 82 0082 6432 03E8, 10 seconds after the screen backlight
automatically reduced to 0x32 brightness.
5A A5 07 82 0082 2020 ****, direct instruction control backlight brightness
0x82 LED_Config 2 0x20 brightness, and backlight screen saver brightness is consistent with
standby.
Note: the first physical touch on the touch screen after a certain period of
time is to wake up the backlight function of the screensaver. Even if the
brightness is the same as the setting value of standby brightness,
"additional first awakening touch and click operation" is still needed after a
certain period of time.
2. When CFG address 0x05 is configured with backlight standby control
over touch screen:
5A A5 05 82 0082 0A**, direct instruction control backlight brightness is
0x0A brightness.
D3: 0x5A = enable page operation once, clear after CPU operation.
D2: Mode.
0x01=page switch (display the selected picture).
0x02=reserved.
0x84 PIC_Set R/W 2 D1:D0: picture ID.
E.g.:
5A A5 07 82 0084 5A01 0001, display the background picture.ICL file
under the 01 ordinal Picture(If the ordinal picture ID of the instruction does
not exist, the instruction operation judgment will not take effect.)
D3=write 0x5A to enable PWM1 setting once, clear after operation.
D2= frequency division coefficient
0x86 PWM0_Set R/W 2 D1:D0=PWM0 precision
PWM0 carrier frequency = 825.7536MHz /(frequency division coefficient
*PWM0 precision).
0x88-
Reserved 10 Undefined
0x91
0x92 PWM0_Out R/W 1 D1:D0=PWM0 output high level width, 0x0000-PWM0 accuracy.
0x93-
Reserved 8 Undefined
0x9A
D1=0x5A start a buzzer; D0= buzzer time, unit 10 ms, 0x00 indicates
0x9B Buzzer switch 1
immediate shutdown.
0x93-
Reserved 9 Undefined
0x9B
D7:D6= write 0x5AA5 to enable RTC setting once;
0x9C RTC_Set W 4 D5:D0=year, month, day, hour, minute, second, all in HEX format.
Need hardware support.
Music player setting:
D3: Starting section of music to play, 0x00-0xFF.
D2: Section number, 0x01-0xFF. Clear after DGUS operation. Under buzzer
0xA0 Music_Play_Set R/W 2
mode, it is buzz time, unit: 8 ms.
D1: Volume, unit: 1/64; Initial value is 0x40(100%)
D0: Return the rest section numbers of music to play, 0x00-0xFF.
0xA2-0x
Reserved 8 Undefined
A9
Update the external memory contents with 32Kbyes block as the
benchmark.
D11: 0x5A= enable once read/write font library (16Mbytes) operation, clear
after operation.
D10: fixed to 0x02.
D9:D8:32Kbytes block address, 0x0000-0x01FF, corresponds to the entire
16Mbytes memory.
D7:D6: the first address of the data stored in the data variable space, which
must be even.
External 16Mbytes
D5:D4: the delay time waiting for the next write operation after the
0xAA FLASH write R/W 6
completion of this operation. During this time the DGUS refresh will
operation
stop .Unit=1 ms,
D3:D0: undefined, write 0x00.
E.g.:
The address operation can achieve picture library, font library and other
serial port 2 update function. The 16Mbytes memory can be seen as either
512 32Kbytes space for writing operation data update or 64 single font ID
space with fixed capacity of 256KB. The following instruction 00B0 can also
be seen as representing update to 22 font ID.
5A A5 0F 82 00 AA 5A 02 00 B0 80 00 00 14 00 00 00 00 00 00
0xB0: 0x5AA5= enable accessing touch control interface once. Clear after
CPU operation.
0xB1: Page ID of touch control.
0xB2: High byte: touch control ID (set in DGUS II development software),
0x00-0xFF;
Touch instruction
0xB0 W 36 Low byte: touch control code, 0x00-0x7F.
access interface
0xB3: Access mode
0xB4-0xD3: data to modify of mode 0x02, 0x03.
Mode 0x0000: turn off this touch control.
Mode 0x0001: turn on this touch control.
Mode 0x0002: Read this touch control and write it to SRAM that 0xB4
pointing to.
Mode 0x0003: update current touch control with data that 0xB4 pointing to,
the format and data length must be the same.
E.g.:
5AA5 0B 82 00B0 5AA5 0001 0905 0000 (close the 9th touch file on page
0001. Basic touch control cannot be turned on/off. If it is ranked in PC
software, it does not need to be counted as effective touch number.
If you need to change the specific properties of the touch, you need to use
mode 03 to replace the 0xb4 prewritten touch file in the property
configuration of the 13bin file.
0xD4: 0x5AA5=enable the operation once, clear after operation.
0xD5: press mode. 0x0001=press, 0x0002=release, 0x0003=keep
pressing, 0x0004=touch (press + release)
0xD6: X coordinate of press position.
0xD7: Y coordinate of press position.
After simulating mode 0x0001 and 0x0003, must simulate 0x0002.
(x, y) coordinate of TP must be set as 0°, CPU will auto-rotate coordinate.
TP operation E.g.:
0xD4 W 4
simulation 5AA5 0B 82 00D4 5AA5 0004 00EE 008F
(0004 is click, press + to raise, 00EE 008F (283,143) coordinates, Press
mode 0x0001= press
0x0002= release 0x0003= continue pressing 0x0004= click
After applying the simulated lift modes 0x0001 and 0x0003, there must be a
simulated lift mode of 0x0002.(after "touch screen sound control" is
enabled, touch screen operation simulation will also trigger the touch screen
buzzer)
0xD8_H: 0x5A = enable the overlay display.
0xD8_L: the position of ICL file which the pointer icon is saved at.
0xD9: the pointer icon ID.
Pointer icon overlay
0xD8 4 0xDA: the X coordinates of pointer icon.
display
0xDB: the Y coordinates of pointer icon.
The pointer icon is always displayed in the background filtering mode, and
the background filtering intensity is fixed at 0x08.
0xD4 Reserved 4 Undefined
D3: 0x5AA5=enable the operation once, clear after operation.
D2: memory type selection
0x00= font space (16Mbytes memory)
0xE0 Memory CRC check R/W 2 0x02=DWIN OS code
0x03=Nor flash database (LIB file).
D1:D0: data interface.
▶ Starts the CRC
Font check mode: D1= start font ID (256KB for each font); D0= the number
of 4KB blocks checked, 0x00-0xFF.
OS code check mode: D1:D0= starting at 0x1000, the byte length of OS
code to be checked is 0x0001-0x7000.
Nor flash database mode: D1:D0=Nor flash database ID, fixed validation of
4KB data each time.
▶after check
Store CRC value.
0xE2-
Reserved 14 Undefined
0xEF
D7: 0x5A = enable the playing operation, clear after operation.
D6: mode, 0x00 = stop(clear the buffer), 0x01 = suspend(reserve the
Interface of playing buffer), 0x02 = start.
0xF0 W 4
music flow data D5:D4: reserved, write 0x0000.
D3:D2: start address of the flow data in variable space.
D1:D0: the word length of the flow data.
D15: 0x5A = enable the painting touch window.
D14: operation mode, 0x00 = normal mode, 0x01 = initialization (clear after
initialization).
D13: parameter configuration.
.7-2 reserved, write 0.
.1-0 painting buff processing mode after page changing. 0x00 = close, 0x01
= re-initialization, others = unchanged.
0xF4 Painting interface W 8 D12: reserved, write 0.
D11: line width, from 0x01 - 0x0F.
D10:D8: painting color, D10=RED D9=GREEN D8=BLUE
D7:D4: the coordinate position of the window upper left corner(x,y).
D3:D2: the width of the pixel points window, must be divisible by 4
D1:D0: the height of the pixel points window, must be divisible by 4
The variable memory occupied by painting touch window is 128KB which is
corresponding to 208*208 pixel.
0xFC Reserved 2 Write 0x00
UART1 high speed
0xFE 2 0x5AA5=enable the download operation
download
0x100-
Reserved 512 Undefined
0x2FF
0x300-0x30F: state feedback for 8 channel curve buffers ( read only
advised), 2 words per channel, high word is the storage pointer location
(0x0000-0x07ff) where curve data is stored, and low word is the effective
0x300- Dynamic curve data length of curve buffer (0x0000-0x0800). Writing 0x0000 to the effective
R/W 128
0x37F interface data length of the curve buffer will cause the curve unable display.
0x310-0x311: start writing curve buffer data
D3: D2:0x5AA5 enable the writing curve buffer data operation once, and
clear after operation.
specially designed for DGUS development platform. The data interface has been defined, which significantly
reduce the development difficulty of customers and shorten development time. DWIN DGUSII platform (including
T5 CPU series and T5L CPU series) has opened the network interface, with the WiFi module, it can be connected
to DWIN cloud through simple DGUS development. Based on the cloud platform of DWIN, customers can realize
remote APP control, data analysis, equipment operation and other functions.
Length Recommende
Definition Address Instructions
(word) d value(hex)
0x5AA5 indicates that the network communication interface is enabled
Recommended value description: Generally 0x5AA5 is written as a
Network fixed value to 22 file.
switch 0x400 1 5AA5 It is also possible to use the configuration button to return or
interface incremental regulation and other touch controls to write the trigger key
value 0x5AA5 to address 0x400 to achieve the opening of the network
interface.
D5-D4:0x5AA5 enable the RMA spatial data uploading immediately.
D3-D2: RMA variable memory address to be uploaded.
D1-D0: the word length of the RMA variable memory to be uploaded.
0000 (Currently up to 4KByte)
RAM
0x401 3 0000 Recommended value description: It is used to transmit the data of the
ALARM
0000 variable address on the screen to the cloud server, which is usually
applied to the cloud call view of the alarm history information and other
parameters. If you do not need to use this function, you can fill in 0000
by default in 22 file.
Reserve 0x404 12 All are 00 Reserve.
High byte: 0x5A indicates that the device description is valid.
Low byte: the encoding method and length of the device description
text.
.7-.6: encoding 0x00=UNICODE 0x01=GBK, GBK is recommended.
0x410 1 5A45
.5-.0: describes the text length 0x00-0x34.
Recommended value description: Write the configuration at a fixed
Device
value of the 22 file corresponding address, the encoding method GBK
description
written here, the text length is 5
Device manufacturer ID, assigned by DWIN factory, 0xFFFF: 0000 -
0x411 2 0xFFFF: FFFF segment is reserved. After the device is added to the
DWIN cloud platform, it is automatically generated by the platform.
The classification of each manufacturer's equipment is according to
0x413 1
the DWIN classification standard equipment classification.
Beijing DWIN Technology Co., Ltd 34 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
Description:
WiFi-10 actively reads 0x490 and other registers every 0.1s-0.2s (the register that DGUS issues commands
to WiFi-10).
Beijing DWIN Technology Co., Ltd 38 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
WiFi-10 will write the status of WiFi-10 to the DGUS register every 3-5 seconds (the status of the WiFi
After completing the configure operation on the DGUS screen or mobile app, WiFi-10 will automatically
The device description information is corresponding to the 0x0800-0x09FF byte address of the 22
initialization file, and the corresponding content configuration (regardless of whether the 22 file initialization
variable buffer function is enabled, the underlying layer will automatically handle the loading).
<Frame Header H> <Frame Header L> <Byte Count> <Command> [<Data>...] [<CRC H> <CRC L>]
Frame Header: Identifies the start of a new DWIN Protocol packet. Can be used to uniquely identify a LCM on a
• Byte Count: Counts the number of bytes in the packet, excluding the Frame Header and this byte, i.e., counts all
sequential.
Beijing DWIN Technology Co., Ltd 40 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
• Format
• Examples
Write the value 3 in Register 0x01 (same as setting the backlight level):
sequential.
• Format
<FHH> <FHL> <BC> 81 <ID> <RG> <LEN> <VL1> [<VL2> <VL3> ...]
• Examples
Read the value in Register 0x01 (same as reading the backlight level):
3F: Data
• Format
• Examples
04D2: Data
Beijing DWIN Technology Co., Ltd 42 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
5AA5 0382 4F 4B
• Format
• Examples
6.4 CRC
DGUSII platform uses Cyclic Redundancy Check (CRC) to verify data integrity during communication. The
The following pseudo-code explains how to calculate the CRC (already swapped).
start
CRC ← 0xFFFF
for each byte, do:
{
CRC ← CRC xor byte
repeat
{
If CRC.bit0 = 1, then
{
shift CRC right once
CRC ← CRC xor 0xA001
}
else
shift CRC right once
}
until 8 right shifts have been performed
}
Swap CRC
end
• C Language:
C# Language:
/// <summary>
/// Calculates CRC16 for a input byte array.
/// </summary>
/// <param name=”dataArray”>Input data.</param>
/// <returns>The calculated CRC16.<returns>
Public static ushort CalculateCrc16(byte[] dataArray)
{
// Compute the MODBUS RTU CRC
ushort crc = 0xFFFF;
foreach (var data in dataArray)
{
crc ∧= data; // XOR byte into least significative byte of CRC
for (var i= 8; I > 0; i--)
{
// Loop over each bit
if ((crc & 0x0001) != 0)
{
// If the LSB is set
crc >>= 1; // Shift right and XOR 0xA001
crc ∧=0xA001;
}
else // Else LSB is not set
crc >> 1; // Just shift right
}
}
var highByte = (crc & 0xFF00);
var lowByte = crc & 0x00FF;
crc = (ushort) ((highByte >> 8) | (lowByte << 8));
return crc;
}
7 Interface Objects
7.1 VP and SP Distribution
Most Interface Objects must be assigned to a Variable Pointer (VP). A VP is an address on the RAM space. Each
For example, if an Incremental Input is assigned to VP 0x1000, when it is activated, it will increment the value
stored at this VP. Assuming the initial value is 0, after two activations (touches on the Touch Panel), the new value
stored on VP x1000 is 2.
A Description Pointer (SP) is a VP used to store the parameters of a Display Variable, so that they can be
Since there are no restrictions on address assignment, conflicts may show up on a project. For example, usually,
you should not assign two Text Displays with Text Lengths greater than 2 to subsequent VPs, because their data
To avoid this problem, always keep in mind how many VPs an Interface Object takes, space them properly:
To improve scalability and avoid unwanted data overlapping, we recommend planning your project’s address
allocation beforehand, so that you can reserve addresses between Objects, and give them plenty of space to
expand:
7.2 Controls
Controls provide direct user input interaction. They can be considered as buttons. All Controls can be activated by
a physical touch from the user, and most of them can be activated via Serial Communication. They are usually
employed to modify the contents of the RAM space, although they may be used purely as Serial Communication
triggers.
Pic_ID 2 Picture ID, high 4bit is button audio ID selection , 0x00 indicates no touch audio.
Upper left corner (Xs, Ys) and lower right corner (Xe, Ye) of control button area.
If the position of corresponding area is set out of the LCM resolution, user can
TP_Area 8
achieve analog trigger touch button with specific key value in the system variable
interface.
Pic_Next 2 Target switch page ID after button press operation, 0xFF** means no page switch.
Pic_On 2 Button press effect page, 0xFF** means no button press effect.
0xFF** = Invalid.
TP_Code 2 0xFD** = Normal Control. Auto-Send Data disabled for this Control.
Other Values = Basic Touch Control. High byte and Low byte are ASCII Code
characters.
If high byte is neither 0xFF, 0xFE or 0xFD, low byte is ASCII Code.
TP_FUN 0,16,32 When TP_Code = 0xFE**, it is used to describe key control function.
Integer:-32768 to 32767;
Unsigned integer:0 to 65535
0x01=4bytes:
Long integer:-2147483648 to 2147483647
Unsigned long integer:0 to 4294967295
0x02=*VP high byte,unsigned number:0 to 255
0x03=*VP low byte,unsigned number:0 to 255
0x04=8bytes, extra long integer : -9223372036854775808 to
9223372036854775807
0x14 N_Int 1 Integer digits
0x15 N_Dot 1 Decimal digits
Show location:right alignment,(x,y)is the upper right coordinate
0x16 (x,y) 4 of the string input cursor.
Undefined when use assembly keyboard(KB_Source=0x0F)
Show color
0x1A Color 2
Undefined when use assembly keyboard(KB_Source=0x0F)
Font position, default 0
0x1C Lib_ID 1
Undefined when use assembly keyboard(KB_Source=0x0F)
Font size
0x1D Font_Hor 1
Undefined when use assembly keyboard(KB_Source=0x0F)
Cursor color
0x1E Cusor_Color 1
Undefined when use assembly keyboard(KB_Source=0x0F)
0x00:The entered text is displayed as *; other values are displayed
0x1F Hide_En 1
according to the entered content.
0x20 0xFE 1 0xFE
0x00=Current page;
0x21 KB_Source 1 0x01=Other page;
0x0F=Assembly keyboard
The page ID where the keyboard is located is valid only if
KB_Source is not equal to 0x00.
0x22 PIC_KB 2
Assembly keyboard(KB_Source=0x0F)= assembly function file
number
Keyboard area coordinates: upper left coordinate (Xs, Ys), lower
right coordinate (Xe,Ye)
0x24 AREA_KB 8
Valid only if the keyboard is not on the current page, I.e. KB_Source
does not equal 0x00.
The upper-left coordinate of the position the keyboard displays on
0x2C AREA_KB_Position 4 the current page, only if the keyboard is not on the current page or
the assembly keyboard.
0x30 0xFE 1 0xFE
0xFF:indicates that input range restriction is enabled and out of the
0x31 Limits_En 1 range is invalid (equivalent to cancellation);
Other values indicates that the input has no range limit.
0x32 V_min 4 Enter lower limit, 4 bytes (long integer or unsigned long integer).
0x36 V_max 4 Input upper limit, 4 bytes (long integer or unsigned long integer).
0x5A: During entry, Return_VP address is loaded with Return_Data
and automatically restored after completion.
0x00:data is not loaded during entry
Function of loading data: it is mainly used in combination with SP
0x3A Return_Set 1 (description pointer) modification of variable display to realize
automatic marking of multi-parameter input process, such as
modifying font color, size, launching a (bit) variable icon or area
anti-color. It can also be used as the mark bit of input process to
realize special requirements with DWIN_OS development.
0x3B Return_VP 2 Load data VP address during entry
0x3D Return_Data 2 Data is loaded into Return_VP during entry
The transparency of the keyboard when it is not on the current page
0x3F Layer_Gama 1
or the assembly keyboard. Range: 0x00~0xFF.
Length( Description
Address Definition
byte)
0x00 Pic_ID 2 Page ID
0x02 TP_Area 8 Area of the Control: upper left corner (Xs,Ys), lower right corner (Xe,Ye).
0x0A Pic_Next 2 Target switch page ID after button press operation, 0xFF** means no page switch.
0x0C Pic_On 2 Button press effect page, 0xFF** means no button press effect.
0x0E TP_Code 2 0xFE06, GBK input key code.
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable Pointer
Maximum text length, in words (two characters for each word).
Range: [0x01,0x7B].
0x13 VP_Len_Max 1 When the text is saved in the specific VP, it will add the 0xFFFF as terminator
automatically at the ending of the text. Thus the variable space is actually
VP_Len_Max+1
Input mode.
0x14 Scan_Mode 1
0x00: re-input, 0x01: modify existing text.
0x15 Lib_GBK1 1 Index in the FLASH memory of the GBK Font to use after entry. 0x00=default.
0x16 Lib_GBK2 1 Index in the FLASH memory of the GBK Font to use before entry.
0x17 Font_Scale1 1 Lib_GBK1 font size,lattice number
0x18 Font_Scale2 1 Lib_GBK2 font size, lattice number
Color of the input cursor.
0x19 Cursor_Color 1 0x00: Black
Other Values: White.
0x1A Color0 2 Text color after entry
The keys on the keyboard must be designed with Basic Touch Controls. Each Basic Touch’s “TP_Code” must be
Code Lower Upper Code Lower Upper Code Lower Upper Code Lower Upper
0x7E60 ` ~ 0x5171 q Q 0x4161 a A 0x5A7A z Z
0x2131 1 ! 0x5777 w W 0x5373 s S 0x5878 x x
0x4032 2 @ 0x4565 e E 0x4464 d D 0x4363 c C
0x2333 3 # 0x5272 r R 0x4666 f F 0x5676 v V
0x2434 4 $ 0x5474 t T 0x4767 g G 0x4262 b B
0x2535 5 % 0x5979 y Y 0x4868 h H 0x4E6E n N
0x5E36 6 ^ 0x5575 u U 0x4A6A j J 0x4D6D m M
0x2637 7 & 0x4969 i I 0x4B6B k K 0x3C2C , <
0x2A38 8 * 0x4F6F o O 0x4C6C l L 0x3E2E . >
0x2839 9 ( 0x5070 p P 0x3A3B ; : 0x3F2F / ?
0x2930 0 ) 0x7B5B [ { 0x2227 ‘ “ 0x2020 SP SP
0x7D5
0x5F2D - _ ] } 0x0D0D Enter Enter
D
0x7C5
0x2B30 = + \ |
C
Length(b Description
Address Definition
yte)
0x00 Pic_ID 2 Page ID
0x02 TP_Area 8 Area of the Control: upper left corner (Xs,Ys), lower right corner (Xe,Ye).
0x0A Pic_Next 2 Target switch page ID after button press operation, 0xFF** means no page switch.
0x0C Pic_On 2 Button press effect page, 0xFF** means no button press effect.
0x0E TP_Code 2 0xFE09, rotation adjustment key code.
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable Pointer
0x00: Adjust the VP(integer)
0x01: Adjust high byte of the VP(1-byte unsigned integer, VP_H)
0x13 Data_Format 1
0x02: Adjust low byte of the VP(1-byte unsigned integer, VP_L)
real time.
Length(b Description
Address Definition
yte)
0x00 Pic_ID 2 Page ID
0x02 TP_Area 8 Area of the Control: upper left corner (Xs,Ys), lower right corner (Xe,Ye).
0x0A Pic_Next 2 Target switch page ID after button press operation, 0xFF** means no page switch.
0x0C Pic_On 2 Button press effect page, 0xFF** means no button press effect.
0x0E TP_Code 2 0xFE0A, sliding adjustment.
0x10 0xFE 1 0xFE
Variable pointer, return adjustment data.
*VP reserved:
0x11 *VP 2 *VP+1 return data:
High byte: adjustment direction, 0x00=increase,0xFF= decrease;
Low byte: adjustment size.
Beijing DWIN Technology Co., Ltd 60 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
Display Variables are always associated to a memory address, and show the contents of such address in some
human-readable form.
Make sure to reserve enough VPs for each Display Variable. Consider their data sizes and
Caution
their SP lengths (when SPs are used).
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A00 2
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000A 2
0x06 0x00 *VP 2 Variable Pointer, integer.
0x08 0x01 (x,y) 4 Upper-left coordinates of the Icons to display
0x0C 0x03 V_Min 2 Minimum value. Values smaller than “V_Min” will show no Icons.
0x0E 0x04 V_Max 2 Maximum value. Values greater than “V_Max” will show no Icons.
0x10 0x05 Icon_Min 2 Icon associated to the V_Min.
0x12 0x06 Icon_Max 2 Icon associated to the V_Max.
0x14 0x07:H Icon_Lib 1 Index in the FLASH memory of the Icon Library to use.
Display mode:
0x15 0x07:L Mode 1 0x00=transparency mode
Others= background display
0x00:overlay
0x16 0x08:H Layer_Mode 1 0x01:overlay mode 1
0x02:overlay mode 2
0x17 0x08:L ICON_Gamma 1 ICON brightness in overlay mode 2, range 0x00-0xFF, unit 1/256.
Background brightness in overlay mode 2, range 0x00-0xFF, unit
0x18 0x09:H PIC_Gamma 1
1/256.
0x19 0x09:L Filter_Set 1 Filter set value in transparency mode, range 0x00-0x3F.
the VP.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A01 2
2 Parameter Pointer.
0x02 *SP
0xFFFF: Disables SP (no run-time modification).
0x04 0x000D 2
2 Variable Pointer.
High word: Unsigned Integer(0x0000-0xFFFF). stores animation
0x06 0x00 *VP
status
Low word: Reserved
0x08 0x01 (x,y) 4 Upper-left coordinates of the Icons to display
Indicates whether the animation should always start from the first
frame when restarting.
0x0000: Animation continues from the last shown frame when
0x0C 0x03 Reset_ICON_En 2
reset.
0x0001: Animation starts from the first frame (“Icon_Start”) when
reset.
0x0E 0x04 V_Stop 2 Value that stops the animation.
0x10 0x05 V_Start 2 Value that starts the animation.
2 Icon displayed when the animation is
0x12 0x06 ICON_Stop
stopped.Range:0x0000-0x00FF
0x14 0x07 ICON_Start 2 Icon displayed at the first frame of the animation.
0x16 0x08 ICON_End 2 Icon displayed at the last frame of the animation.
0x18 0x09:H ICON_Lib 1 Index in the FLASH memory of the Icon Library to use.
1 ICON display mode:
0x19 0x09:L Mode 0x00: Transparent background.
Other Values: Opaque background
0x00:overlay
0x1A 0x0A:H Layer_Mode 1 0x01:overlay mode 1
0x02:overlay mode 2
0x1B 0x0A:L ICON_Gamma 1 ICON brightness in overlay mode 2, range 0x00-0xFF, unit 1/256.
1 Background brightness in overlay mode 2, range 0x00-0xFF,
0x1C 0x0B:H PIC_Gamma
1/256.
0x1D 0x0B:L Time 1 Time of single ICON, unit DGUS cycle, range 0x01-0xFF.
1 0x00: loop mode.
0x01: single mode.
0x1E 0x0C:H Display mode
When the variable is VP_Stop, it play an animation once from
Icon_End to Icon_Start.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A02 2
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000C 2
0x06 0x00 *VP 2 Variable Pointer.
0x08 0x01 V_Begin 2 Minimum value accepted by the control.
0x0A 0x02 V_End 2 Maximum value accepted by the control.
Minimum position of the slider, when its value equals “V_Begin”.
0x0C 0x03 x_Begin 2 X coordinate for horizontal sliders, Y coordinate for vertical
sliders.
Maximum position of the slider, when its value equals “V_Begin”.
0x0E 0x04 x_End 2 X coordinate for horizontal sliders, Y coordinate for vertical
sliders.
Index of the Icon in the Icon Library that will be used as the Slider
0x10 0x05 ICON_ID 2
handle.
Position of slider icon in the secondary axis.
0x12 0x06 Y 2 Y coordinate for horizontal sliders, X coordinate for vertical
sliders.
Icon position offset adjustment on the primary axis, in pixels.
0x14 0x07:H x_adj 1 Offset in the X axis for horizontal sliders, and in the Y axis for
vertical sliders.
Slider mode.
0x15 0x07:L Mode 1 0x00: Horizontal
0x01: Vertical.
0x16 0x08:H ICON_Lib 1 Index in the FLASH memory of the Icon Library to use.
ICON display mode:
0x17 0x08:L ICON_Mode 1 0x00: Transparent background.
Other Values: Opaque background
Value Memory Size.
0x18 0x09:H VP_Data_Mode 1 0x00: *VP points to the VP(integer).
0x01: *VP points to the High Byte of the VP(VP_H).
0x00:overlay
0x19 0x09:L Layer_Mode 1 0x01:overlay mode 1
0x02:overlay mode 2
0x1A 0x0A:H ICON_Gamma 1 ICON brightness in overlay mode 2, range 0x00-0xFF, unit 1/256.
1 Background brightness in overlay mode 2, range 0x00-0xFF,
0x1B 0x0A:L PIC_Gamma
1/256.
0x1C 0x0B:H Filter_Set 1 Filter set value in transparency mode, range 0x00-0x3F.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A03 2
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x0009 2
0x06 0x00 *VP 2 Variable Pointer.
Start display position:
Upper-left coordinates of the Icons to display in Left- alignment
0x08 0x01 (X,Y) 4
mode or Upper-right coordinates of the Icons to display in Right-
alignment mode.
Icon corresponding to digit 0. The Icon Library must follow this
0x0C 0x03 ICON0 2
indexing order: [0123456789-.].
0x0E 0x04:H ICON_Lib 1 Index in the FLASH memory of the Icon Library to use.
0x00: Transparent background.
0x0F 0x04:L ICON_Mode 1
Other Values: Opaque background
0x10 0x05:H Integer_Digits 1 Number of digits to the left of the decimal separator.
0x11 0x05:L Decimal_Digits 1 Number of digits to the right of the decimal separator.
Value Memory Size.
0x00: 16-bit Integer(2 bytes). Range: -32768 ~ 32767
0x01: 32-bit Integer(4 bytes). Range: -2147483648 ~ 2147483647
0x02: 8-bit Unsigned Integer in High Byte of the VP. Range: 0 ~ 255
0x12 0x06:H VP_Mode 1 0x03: 8-bit Unsigned Integer in Low Byte of the VP. Range: 0 ~ 255
0x04: 64-bit Integer(8 bytes). Range: -9223372036854775808 ~
9223372036854775807
0x05: 16-bit Unsigned Integer(2 bytes). Range: 0 ~ 65535
0x06: 32-bit Unsigned Integer(4 bytes). Range: 0 ~ 4294967295
Beijing DWIN Technology Co., Ltd 65 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
jumps.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A04 2
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x0005 2
0x06 0x00 0x0000 2 0x0000
0x08 0x01 Pic_Begin 2 Page ID of the first animation frame.
0x0A 0x02 Pic_End 2 Page ID of the last animation frame.
Time spent in each animation Screen. Range: 0x00-0xFF, in 8 ms
0x0C 0x03:H Frame_Time 1
steps.
Image ID in the FLASH memory, 0x00~0xFF.
0x0D 0x03:L ICL_LIB_ID 1
0x00: configured by SD card.
0x0E 0x04 Pic_End_Exp 2 Return page after playing animation saved in NANA Flash
0x10 0x05 Reserved 16 0x00
SP Length SP
Definition Description
Address (bytes) Address
0x00 0x5A05 2 0x5A05.
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000C 2 0x000C.
0x06 0x00 *VP 2 Variable Pointer.
Index of the Icon in the Icon Library that will be rotated (usually a dial
0x08 0x01 ICON_ID 2
needle).
0x0A 0x02 ICON_xc 2 Center of rotation on the Icon. X coordinate.
0x0C 0x03 ICON_Yc 2 Center of rotation on the Icon. Y coordinate.
Center of rotation on the Screen. The center of rotation of the Icon is
0x0E 0x04 xc 2
placed in this point, and pivots around it. X coordinate.
Center of rotation on the Screen. The center of rotation of the Icon is
0x10 0x05 Yc 2
placed in this point, and pivots around it. Y coordinate.
0x12 0x06 V_Begin 2 Minimum value.
0x14 0x07 V_End 2 Maximum value.
Minimum angle, associated to “V_Begin”. Given in 0.5° steps.
0x16 0x08 AL_Begin 2
Range: 0-720(0x000-0x2D0), which is equivalent to 0° to 360°.
Maximum angle, associated to “V_End”. Given in 0.5° steps.
0x18 0x09 AL_End 2
Range: 0-720(0x000-0x2D0), which is equivalent to 0° to 360°.
Value Memory Size.
0x00: *VP points to the VP (integer).
0x1A 0x0A:H VP_Mode 1
0x01: *VP points to the High Byte of the VP (VP_H).
0x02: *VP points to the Low Byte of the VP (VP_L).
0x1B 0x0A:L Lib_ID 1 Index in the FLASH memory of the Icon Library to use.
0x00: Transparent background.
0x1C 0x0B Mode 1
Other Values: Opaque background
represents the state of a single Icon, and many Icons can be shown, in different states, based on the VPC.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A06 2 0x5A06
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000C 2 0x000C
0x06 0x00 *VP 2 Variable Pointer.
Auxiliary Variable Pointer. 2 words. User can not use them, should be
0x08 0x01 *VP_AUx 2
allocated right after VP.
Indicates which bits are displayed.
0x0A 0x02 Act_Bit_Set 2 0b1: Active bit.
0b0: Inactive bit.
The following table describes what icons are shown when each bit
value is either 0 or 1.
Mode Bit Value
0 1
0x00 ICON0S ICON1S
0x0C 0x03:H Display_Mode 1 0x01 ICON0S None
0x02 ICON0S Animation:ICON1S-ICON1E
0x03 None ICON1S
0x04 None Animation:ICON1S-ICON1E
0x05 Animation:ICON0S-ICON0E ICON1S
0x06 Animation:ICON0S-ICON0E None
0x07 Animation:ICON0S-ICON0E Animation:ICON1S-ICON1E
Bit icons arranged mode.
0x00: Horizontal, no space reserved for inactive bits.
0x0D 0x03:L Move_Mode 1 0x01: Vertical, no space reserved for inactive bits.
0x02: Horizontal, space reserved for inactive bits.
0x03: Vertical, space reserved for inactive bits.
ICON display mode:
0x0E 0x04:H Icon_Mode 1 0x00: Transparent background.
Other Values: Opaque background.
0x0F 0x04:L Icon_Lib 1 Index in the FLASH memory of the Icon Library to use.
Modes 0, 1, 2; Bit value = 0; Icon shown.
0x10 0x05 ICON0S 2
Modes 5, 6, 7; Bit value = 0: First icon in animation mode.
0x12 0x06 ICON0E 2 Modes 5, 6, 7; Bit value = 0: Last icon in animation mode.
Modes 0, 3, 5; Bit value = 1; Icon shown.
0x14 0x07 ICON1S 2
Modes 2, 4, 7; Bit value = 1: First icon in animation mode.
0x16 0x08 ICON1E 2 Modes 2, 4, 7; Bit value = 1: Last icon in animation mode.
Beijing DWIN Technology Co., Ltd 68 www.dwin.com.cn
DWIN Technologies
Professional, Creditable, Successful T5L_DGUSII Application Development Guide
SP Length
Definition Description
Address (bytes)
0x00 2
Parameter Pointer.
0x02 2
0xFFFF: Disables SP (no run-time modification).
Variable Pointer, must be even.
D3:0x5A = enable the display, others = disable the display.
D2:displayed ICON ID, range 0-N.
D1:display mode, only works for the display of background copy .
0x06 0x00 .7 filter switch 0=open filter,1=display background.
4
.6 reserved,0.
.5-.0 filter set value 0x01-0x3F。
D0:brightness of ICON, only works for the display of background copy.
If the brightness of ICON is not set to 0xFF, the ICON will display together with
background, and the display speed will be slower about 30% .
The position of the ICON to display, must be even.
D3:D2: X coordinate of the upper-left ICON corner.
0x08 0x01 4
D1:D0: Y coordinate of the upper-left ICON corner.
The data is described through the number sequence of the ICON ID(0-N).
Parameter pointer of the source ICON, must be even. Every ICON occupy 4
bytes.
D7:D6: X coordinate of the upper-left ICON corner.
D5:D4: Y coordinate of the upper-left ICON corner.
0x0A *VP2 8
D3:D2:width pixels of the ICON.
D1:D0:Height pixels of the ICON.
The data is described through the number sequence of the ICON ID(0-N).
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A10 2 0x5A10
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000D 2 0x000D
0x06 0x00 *VP 2 Variable Pointer
0x08 0x01 X,Y 4 Upper-left coordinates of the text to display.
0x0C 0x03 COLOR 2 Text color.
0x0E 0x04:H Lib_ID 1 Index in the FLASH memory of the ASCII Font to use.
0x0F 0x04:L Font_Width 1 Font width, in pixels.
0x00: Left-alignment.
0x10 0x05:H Alignment 1 0x01: Right-alignment.
0x02: Center- alignment.
0x11 0x05:L Integer_Digits 1 Number of digits to the left of the decimal separator.
0x12 0x06:H Decimal_Digits 1 Number of digits to the right of the decimal separator.
Value Memory Size.
0x00: 16-bit Integer (2 bytes). Range: -32768 ~ 32767
0x01: 32-bit Integer (4 bytes). Range: -2147483648 ~
2147483647
0x02: 8-bit Unsigned Integer in High Byte of the VP. Range: 0 ~
255
0x13 0x06:L VP_Mode 1 0x03: 0x03: 8-bit Unsigned Integer in Low Byte of the VP.
Range: 0 ~ 255
0x04: 64-bit Integer (8 bytes). Range: -9223372036854775808
~ 9223372036854775807
0x05: 16-bit Unsigned Integer (2 bytes). Range: 0 ~ 65535
0x06: 32-bit Unsigned Integer (4 bytes). Range: 0 ~
4294967295
Length of text to append after the digits, in characters. range
0x14 0x07:H Len_unit 1
0-11.
0x15 0x07:L String_Unit Max 11 Text to append after the digits. ASCII code.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A11 2 0x5A11
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000D 2 0x000D
0x06 0x00 *VP 2 Variable Pointer
0x08 0x01 (X,Y) 4 Upper-left coordinates of the text to display.
0x0C 0x03 Color 2 Text color.
Upper- left coordinates and lower-right of the area where the text
0x0E 0x04 (Xs,Ys)(Xe,Ye) 8
will be displayed.
Maximum text length, in bytes (characters), stop display when data
0x16 0x08 Text_Length 2
is 0x0000 or 0xFFFF.
Index in the FLASH memory of the Font to use, for encoding
0x18 0x09:H Font0_ID 1
modes0x01 - 0x04.
Index in the FLASH memory of the Font to use, for encoding
0x19 0x09:L Font1_ID 1 modes0x00 and 0x05, and other non-ASCII fonts for encoding
modes0x01 -0x04.
Font width, in pixels. Must be even. In encoding modes 0x01 -0x04,
0x1A 0x0A:H Font_x_Dots 1
must be twice the Width.
0x1B 0x0A:L Font_Y_Dots 1 Font height, in pixels.
Character spacing mode is defined by bit7:
0: Automatic spacing.
1: Fixed spacing.
Font encoding is defined by bits 6 to 0:
0x00: 8 bit.
0x1C 0x0B:H Encode_Mode 1
0x01: GB2312.
0x02: GBK.
0x03: BIG5
0x04: SJIS
0x05: UNICODE.
0x1D 0x0B:L HOR_Dis 1 Spacing between characters, in pixels.
0x1E 0x0C:H VER_Dis 1 Spacing between lines, in pixels.
0x1F 0x0C:L Reserved 1 0x00
(2)Used to display current time, in analog format (a radial clock). Uses the internal RTC.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A12 2 0x5A12
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000D 2 0x000D
0x06 0x00 0x0001 2 0x0001
Center of rotation on the Screen. The center of rotation of the Icon is
0x08 0x01 (X,Y) 4
placed in this point, and pivots around it.
Index of the Icon showing the Hour hand.
0x0C 0x03 Icon_Hour 2
0xFFFF: none.
0x0E 0x04 Icon_Hour_Central 4 Center of rotation on the Hour Icon.
Index of the Icon showing the Minute hand.
0x12 0x06 Icon_Minute 2
0xFFFF: none.
0x14 0x07 Icon_Minute_Central 4 Center of rotation on the Minute Icon.
Index of the Icon showing the Second hand.
0x18 0x09 Icon_Second 2
0xFFFF: none.
0x1A 0x0A Icon_Second_Central 4 Center of rotation on the Second Icon.
0x1E 0x0C:H Icon_Lib 1 Index in the FLASH memory of the ASCII Font to use.
0x1F 0x0C:L Reserved 1 0x00
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A13 2 0x5A13
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000D 2 0x000D
Variable Pointer.
0x06 0x00 *VP 2 The data will be displayed in HEX format when half-byte data is
greater than 0x9, e.g.: 0x32: display 32, 0xBF: display BF.
0x08 0x01 (X,Y) 4 Upper-left coordinates of the text to display.
0x0C 0x03 Color 2 Text color.
.7: BCD encoded switch.
0= off.
0x0E 0x04:H Mode 1 1= on.
.6-.4: reserved.
.3-.0: Byte numbers to be displayed, 0x01 - 0x0F.
0x0F 0x04:L Lib_ID 1 Index in the FLASH memory of the Font to use.
0x10 0x05:H Font_x 1 Font width, in pixels.
Sequence of characters (ASCII) representing the separators for this
Hex Display. The current value (contained on VP) will be shown in
0x11 0x05:L String_Code MAX15
hexadecimal, and after each byte, a separator character is inserted.
Special characters: 0x00 (blank), 0x0D (new line).
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A14 2 0x5A14
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000B 2 0x000B
Text Variable Pointer. First three VP must be reserved. Text is saved
0x06 0x00 *VP 2
after the 3rd VP and ended with 0x00 or 0x0F.
0x08 0x01:H Rolling_Mode 1 0x00: from left to right.
0x09 0x01:L Rolling_Dis 1 Rolling space in a DGUS cycle, in pixel.
0x00: Left-alignment.
0x0A 0x02:H Adjust_Mode 1 0x01: Right-alignment.
0x02: Center- alignment.
Rolling will stop when the text length smaller than textbox.
0x0B 0x02:L Reserved 1 0x00
0x0C 0x03 Color 2 Text color.
Upper- left coordinates and lower-right of the area where the text will
0x0E 0x04 Xs Ys Xe Ye 8
be displayed.
Index in the FLASH memory of the Font to use, for encoding
0x16 0x08:H Font0_ID 1
modes0x01 - 0x04.
Index in the FLASH memory of the Font to use, for encoding
0x17 0x08:L Font1_ID 1 modes0x00 and 0x05, and other non-ASCII fonts for encoding
modes0x01 -0x04.
Font width, in pixels. Must be even. In encoding modes 0x01 -0x04,
0x18 0x09:H Font_X_Dots 1
must be twice the Width.
0x19 0x09:L Font_Y_Dots 1 Font height, in pixels.
Character spacing mode is defined by bit7:
0: Automatic spacing.
1: Fixed spacing.
Font encoding is defined by bits 6 to 0:
0x00: 8 bit.
0x1A 0x0A:H Encode_Mode 1
0x01: GB2312.
0x02: GBK.
0x03: BIG5
0x04: SJIS
0x05: UNICODE.
0x1B 0x0A:L Text_Dis 1 Spacing between characters, in pixels.
0x1C 0x0B:H Reserved 4 0x00
values.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A15 2 0x5A15
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x 000C 2 0x000C
0x06 0x00 *VP 2 Variable Pointer, two words. The second one is reserved.
0x08 0x01 V_MIN 2 Minimum value.
0x0A 0x02 V_MAX 2 Maximum value.
0x0C 0x03:H Integer_Digits 1 Number of digits to the left of the decimal separator.
0x0D 0x03L Decimal_Digits 1 Number of digits to the right of the decimal separator.
0x0E 0x04:H Data_Num 1 Display data amount
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A20 2 0x5A20
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x000B 2 0x000B
0x00: display from right side to left side.
0x06 0x00:H Mode 1
Others: display from left side to right side.
0x07 0x00:L 0x00 1 Reserved
Upper-left coordinates and lower-right coordinates of the curve.
0x8 0x01 Xs,Ys Xe,Ye 8
Do not display when data is out of range.
0x10 0x05 Y_Central 2 Y center of the curve.
The corresponding value of ‘Y_Central’, which is the mean value of
0x12 0x06 VD_Central 2
the maximum data and minimum data.
0x14 0x07 Color 2 Curve color
0x16 0x08 MUL_Y 2 Vertical Zoom. Range: 0x0000-0x7FFF.
0x18 0x09:H CHANEL 1 Channel of the curve. Range: 0x00-0x07.
0x19 0x09:L Dis_HOR 1 Horizontal Increment. Range: 0x01-0xFF.
0x1A 0x0A:H Pixel_Scale 1 Width of curve, range: 0x00-0x07, in pixel.
0x1B 0x0A:L Reserved 5 0x00
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A21 2 0x5A21
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x0008 2 0x0008
0x06 0x00 *VP 2 Variable Pointer
Upper-left coordinates and lower-right coordinates of the Graphic.
0x08 0x01 Area 8
Only valid for Commands 0x0001 -0x0005, 0x0009 -0x000B
Enables or disables the dashed line pattern for Commands 0x0002,
0x0003, 0x0009, 0x000A.
0x10 0x05:H Dashed_Line_En 1
0x5A: The drawn lines are dashed.
Other Values: Full lines are drawn.
Dash pattern format. The pattern has 4 segments (bytes):
Byte 1: Length of the first opaque segment.
0x11 0x05:L Dash_Set 4 Byte 2: Length of the first transparent segment.
Byte 3: Length of the second opaque segment.
Byte 4: Length of the second transparent segment.
0x15 0x07 Reserved 13 0x00
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A24 2 0x5A24
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x0007 2 0x0007
0x06 0x00 (Xs,Ys) 4 Upper-left coordinates of the area.
0x08 0x02 (Xe,Ye) 4 Lower-right coordinates of the area.
0x0C 0x04 Dis_Move 2 Move space every DGUS cycle. In pixel.
0x00: move left.
0x01: move right.
0x10 0x05_H Mode_Move 2
0x02: move up.
0x03: move down.
0x12 Reserved 13 0x00
7.3.18 QR Code
Used to display QR Codes generated from the value of the VP.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A25 2 0x5A25
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x0004 2 0x0004
7.3.19 Brightness
Used to control the brightness of an area of the page.
SP Length
Address Definition Description
Address (bytes)
0x00 0x5A26 2
Parameter Pointer.
0x02 *SP 2
0xFFFF: Disables SP (no run-time modification).
0x04 0x0005 2
0x06 0x00 *VP 2 Variable Pointer.
0x08 0x01 (Xs,Ys) 4 Upper-left coordinates of the area.
0x0C 0x03 (Xe,Ye) 4 Lower-right coordinates of the area.
0x10-0x1F Reserved 18 0x00