T5UID1 Application Guide - V30.Zh-CN - en
T5UID1 Application Guide - V30.Zh-CN - en
com
T5UID1 is a low-resolution DGUS II software platform based on T5 CPU from DWIN Technology. Its main features include: (1) Based on T5 dual-
core CPU, both GUI and OS core run at 250MHz main frequency with extremely low power consumption.
(2) 128Mbytes Flash, of which 64Mbytes is used as image storage, which can store 250 full-screen images with a resolution of
480*272. (3)
64Mbytes font space, the last 32Mbytes font space is reused with music space. 256
(4) segments (2.048 seconds each) 32KHz 16bit WAV format high quality music playback.
(10) Support standard T5 DWIN OS platform: The hardware can lead to 20 IOs, 6 UARTs, multiple ADs, PWMs, and provide customized services.
(12) Display variables can be turned on, off or modified in the application to achieve complex display combination functions. (13) Touch
commands can be turned on, off or modified in the application to achieve complex touch combination functions. (14) Support SD interface
download and configuration, download file statistics display and verification, and download files can be encrypted. (15) Support SD interface file
(16) Supports direct connection to DWIN Cloud via DWIN WiFi module. (17) Supports capacitive touch screen sensitivity adjustment,
Beijing Diwen Technology Co., Ltd. -1- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
2 DGUS Function List
01 0x00 Variable Icon Display 1 automatically switch accordingly. It is mostly used for fine dashboards and progress bar displays. Support background
A fixed value data variable corresponds to 3 different icon indication states: no display, display fixed icon,
Supports background overlay and transparency settings, and can set animation speed.
The change range of a data variable corresponds to the change of the display position of an icon (slider). It is
03 0x02 Slider scale indicator 1 mostly used for indicating liquid level, dial, and progress meter.
05 0x04 Picture animation display none Play a group of full-screen images at a specified speed. Mostly used for startup interface or screen saver.
Linearly correspond the range of a data variable to the angle data, and then rotate an icon according to the
06 0x05 Icon rotation display 1
corresponding angle data and display it. It is mostly used for pointer dashboard display.
The 0/1 state of each bit of a data variable corresponds to two of the eight different display schemes,
07 0x06 Bit variable icon display 3 and is displayed using an ICON icon (or icon animation).
It is mostly used to display switch status, such as the operation (animation) and stop (static icon) of the fan.
Display a data variable in the specified format (integer, decimal, with or without unit) using Arabic
08 0x10 Data variable display 1/2/4
numerals of the specified font and size.
10 0x12_00 Text format RTC display none The Gregorian calendar RTC is displayed as text in the format edited by the user.
11 0x12_01 Dial format RTC display none The ICON icon is rotated and the Gregorian calendar RTC is displayed in the form of a pointer dial.
Display the variable data in byte HEX format with user-specified ASCII characters at intervals. It is mostly
12 0x13 HEX data display Big 8
used for timing display, for example, 0x1234 is displayed as 12:34.
13 0x14 Text scrolling display User defined Scroll the text stored in the variable space to display it in the specified area of the screen.
Display the data variables in a specified display window and highlight the selected value. Combined with touch screen
sliding or incremental adjustment, the data can be scrolled. The adjustment speed can also be controlled by DWIN OS.
14 0x15 Data window indication 2
The variable occupies 2 word positions, and the (VP+1) position is reserved.
DGUSII Text Display Based on DGUS II fonts, the string is displayed in the specified text box display area. Compared with 0x11 text display, the main
15 0x16 Big 2K.
(Text is displayed without jagged edges) difference is that the text is not jagged, and the multi-language display directly changes the font library.
Automatically match and display real-time curves (trend graphs) based on curve buffer data, line thickness can be set. You
16 0x20 Real-time curve (trend chart) 2K per channel can specify the display area, center axis coordinates, and display ratio (zoom in/out) , Set Curve
direction.
20 0x21_04 Drawing_Rectangle Fill Fill the specified rectangular area. The fill color, position and size are controllable.
twenty one 0x21_05 Drawing_Circle Display the entire arc, with controllable color, position and size.
twenty two 0x21_06 Drawing_Picture Copy and Paste Copy an area from the specified image and paste it to the currently displayed page.
User defined
twenty three 0x21_07 Drawing_ICON Icon display ICON Icons are displayed and icon libraries can be selected.
twenty four 0x21_08 Drawing_Closed Area Fill Select a seed position and fill the closed solid color area with the specified color.
25 0x21_09 Plot_Spectrum Display Display spectrum (vertical lines) according to variable data, and the line color and position can be controlled.
26 0x21_0A Drawing_Line Display Connect line segments according to variable data, with controllable endpoints and colors.
27 0x21_0B Drawing_Arc Display Display arcs with controllable radius, color, start and end angles.
28 0x21_0D Drawing_Rectangular Domain XOR Perform an XOR operation on the specified rectangular bitmap data with the specified color, which is mostly used for highlighting.
Move the contents of the specified area in a circular motion, and the moving direction can be set.
29 0x24 Area scrolling 1 Used to simply realize dynamic operation effects such as flowcharts and progress bars on the screen. The variable is occupied by the
30 0x25 QR code display Big 259 Display the QR code graphic on the screen according to the specified content.
31 0x26 Adjust the area display brightness 1 Adjust the display brightness of the specified display area to highlight or fade the background display.
Remark:
For more detailed function descriptions, please refer to the DGUS Screen Development Guide.
VP refers to the storage location (pointer) of the user variable storage space.
When developing PC configuration software, set the variable description pointer, and store the display variable configuration information in the user variable space pointed to by the variable description pointer. In
the application, you can access it through the serial port or DWIN OS, dynamically open, close or modify the variable configuration information, and realize complex display variable combination functions.
Beijing Diwen Technology Co., Ltd. -2- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
2.2 Touch Variables
sequence Touch User variable length
Function illustrate
Number Key Code (Word)
Enter various data such as integers, fixed-point decimals, etc. into the specified variable storage space. The
01 00 Variable data entry 1/2/4
transparency of the popup keyboard can be set.
Click to trigger a popup menu and return the key code of the menu item.
02 01 Pop-up menu selection 1
Popup menu transparency can be set.
Click the button to perform +/- operation on the specified variable, and set the step size and upper and lower
03 02 Incremental Adjustment 1
limits. Setting the 0-1 range loop adjustment can realize the column check box function.
04 03 Drag adjustment 1 Drag the slider to input variable data and set the scale range.
05 05 Key value returned 1 Click a button to directly return the button value to the variable. Bit variable return is supported.
ASCII or GBK Chinese text mode inputs text characters, and the input process supports cursor movement and
06 06 Text Entry Big 127 editing. The input status and input length can be saved in the (VP-1) position.
The transparency of the pop-up keyboard in ASCII input mode can be set.
Number of touch screen press states Click the touch screen to return data to the variable as specified.
07 08 User defined
According to the return It does not support returning to serial port mode, but it can be achieved by configuring automatic upload of touch data.
According to the touch screen sliding in the X-axis or Y-axis direction of the specified area, the relative adjustment value is returned in real time. In conjunction
08 0A Slide (gesture) adjustment 2 with the data window indicating the display variable, dynamic rolling character adjustment can be achieved.
According to the specified area, slide the touch screen in the X-axis direction to realize dynamic dragging of the page. You can set the target and
area of page switching, and the variable display of the current page will follow the dragging. If there are other touch buttons on the sliding
09 0B Slide (gesture) to turn pages none
page and the entire page (including dragging the touch buttons) needs to be able to turn pages with gestures, the touch priority of the sliding
Remark:
For detailed function description, please refer to DGUS Screen Development
By accessing the touch command access interface defined in the 0x00B0 variable space through the serial port or DWIN OS, you can dynamically turn on, off or modify the specified touch
Beijing Diwen Technology Co., Ltd. -3- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
2.3 Serial communication protocol (UART2)
The system debugging serial port UART2 mode is fixed to 8N1, the baud rate can be set, and the data frame consists of 5 data blocks:
data block 1 2 3 4 5
definition Frame Header Data length instruction data CRC check (optional)
Data length 2 1 1 N 2
illustrate 0x5AA5 Including instructions, data, and verification. 0x80/0x81/0x82/0x83
Example (no verification ) 5A A5 04 83 00 10 04
Example (with verification ) 5A A5 06 83 00 10 04 25 A3
The CRC check is enabled or disabled by the configuration file0x2C.6Bit control.
Issued:
Specify the address to start writing the data string to the register.
Register page (0x00-0x08) + register address (0x00-0xFF) + written data
0x80
answer:
Write command response.
0x4F 0x4B .
Issued:
Register page (0x00-0x08) + register address (0x00-0xFF) + read data byte Start reading data from the specified register.
length (0x01-0xFB)
0x81
answer:
Register page (0x00-0x08) + register address (0x00-0xFF) + data length + data Data response.
Issued: Write the data string (word data) to the variable space starting from the specified address.
Variable space first address (0x0000-0xFFFF) + written data Do not write to the space reserved by the system.
0x82
answer:
Write command response.
0x4F 0x4B .
Issued:
Reads the specified length of word data starting from the specified address in the variable space.
Variable space first address (0x0000-0xFFFF) + read data word length (0x01-0x7D)
0x83
answer:
Data response.
Variable space first address + variable data word length + read variable data
Beijing Diwen Technology Co., Ltd. -4- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
3 System variable interface (0x0000-0x0FFF variable memory space)
Data with the same background color in the table are updated at the same time and must be rewritten all at once.
long
Variable address definition explain bright
Spend
0x06 OS_Update_CMD 2 completed. D2: Fixed to 0x10. The DWIN OS code must start from 0x1000.
[Link] The first address of the data variable space for storing the upgrade code, which must be an even number.
D7: Operation mode 0x5A = read 0xA5 = write, cleared after CPU operation.
[Link] The first address of the on-chip Nor Flash database, must be an even number, 0x000000-0x02:7FFE, 160KWords. [Link] The first
0x08 NOR_FLASH_RW_CMD 4
address of the data variable space, must be an even number.
0x0C reserve 3
0x0F Ver 1 Application software version. D1 indicates the GUI software version, and D0 indicates the DWIN OS software version.
D7=year (0-0x63) D6=month (0-0x0C) D5=day (0-0x1F) D4=week (0-0x6) D3=hour (0-0x17) D2=minute (0-0x3B)
0x10 RTC 4 D1=second (0-0x3B) D0 is undefined, all data are in HEX format. Requires hardware support (for hardware
without built-in RTC, the RTC time is written by the user).
0x14 PIC_Now 1 The ID of the currently displayed page
0x15 GUI_Status 1 GUI operation status feedback: 0x0000 means idle, 0x0001 means processing 13, 14 variable files.
D7: 0x5A indicates that the touch screen data has been updated and the OS is
0x16 TP_Status 4 cleared. D6: Touch screen status 0x00 = Release 0x01 = First press 0x02 = Lift D5: D4 = 0x03=Pressing
X coordinate D3: D2 = Y coordinate D1: D0 = 0x0000.
D1: 0x5A indicates that VCC_Now, backlight brightness value, and instantaneous values of AD0-AD3 have been updated. D0:
0x31 LED_Now 1
Current backlight brightness value, 0x00-0x64.
0x32 AD0-AD3 instantaneous value 4 Instantaneous value of AD0-AD3 channels, 1 word per channel. Voltage = AD value * 4800/65532 [Link] hardware support.
0x36 AD calculation update flag 1 D0=0x5A indicates that the temperature and AD0-AD7 calculation data have been updated and OS is [Link] hardware support.
0x37 T_Core 1 CPU core temperature, temperature = T_Core*240/929, unit 0.1℃, accuracy +/-0.1℃.
16-bit AD calculation value of AD0-AD7, reference voltage is 4800mV.
0x38 AD0-AD7 calculated value 16 Each channel has 2 words, the high word is the average value (DC component), and the low word is the RMS value (AC component).
The A/D sampling rate of each channel is 5KSPS, and it is calculated using 256-point sampling data.
0x82 LED_Config 2 D3 = turn on brightness, 0x00-0x64; when the backlight standby control is turned off, D3 is the software brightness adjustment
D3: 0x5A indicates starting a page process, and the CPU clears after the process is completed. D2:
Processing mode.
0x84 PIC_Set 2 0x01 = Page switch (display the picture specified in the picture storage area to the current background
page). 0x02 = Page save (save the current background page to the specified picture storage area).
D7=0x5A starts PWM1 setting once and is cleared after CPU processing.
0x86 PWM1_Set 4 D6 = frequency division coefficient D5:D4 = PWM1 precision PWM1 carrier frequency = 501.35MHz/(frequency division coefficient*PWM1 precision).
D3: D0 reserved
Beijing Diwen Technology Co., Ltd. -5- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
0x8E PWM3_Set 4 PWM3 settings.
0x92 PWM1_Out 1 D1:D0=PWM1 output high level width, 0x0000-PWM1 [Link] hardware support.
0x93 PWM2_Out 1 D1:D0=PWM2 output high level width, 0x0000-PWM2 [Link] hardware support.
0x94 PWM3_Out 1 D1:D0=PWM3 output high level width, 0x0000-PWM3 [Link] hardware support.
0x95 PWMV1_Out 1 D1:D0=PWMV1 output ratio, 0x0000-0x3E8, output is synchronized with 50Hz pin input [Link] support required .
0x96 PWMV2_Out 1 D1:D0=PWMV2 output ratio, 0x0000-0x3E8, output is synchronized with 50Hz pin input [Link] support required .
0x97-0x9B reserve 5 Undefined
D7:D6=0x5AA5 Start RTC once and set D5:D0=year, month, day, hour, minute, and second, all in HEX format.
0x9C RTC_Set 4
Only valid if a hardware RTC is installed.
D0: Playback progress returned in real time (number of remaining playback segments 0x00-0xFF).
D7: 0x5A Starts writing data from the data variable area into the background image buffer. [Link] The first
Download mode
0x01 = Update to the current background page (page switching will overwrite). 0x02 = Save directly to the
image storage area (background operation, does not change the current display). [Link] The first address
of the data variable space storing the JPEG file, must be an even number, file [Link] 64Kbytes in size.
0xA6 JPEG_Download 4
0x01 mode: D3:D2 = the upper left corner coordinates of the image/icon display position on the
background page. 0x02 mode: D3:D2 is the image storage ID, 0x0000-0x00F0.
The resolution of the JPEG image cannot exceed the resolution of the screen, and the coordinates and image must be set according to the 0° display direction (for a
90° deflected display, the user can deflect the image and coordinates in advance).
D11: 0x5A = Start a font library (64Mbytes) read and write operation, CPU reset after operation. D10:
Operation mode, 0x01 = read font library data 0x02 = update font library data.
the data in the font library, according to the word definition, 0x00 00 00-0x01 FF FF. [Link] The first address of
Nand [Link] The length of the data to be read, according to the word definition, must be an
0xAA 6
Flash_RW_CMD even number. [Link] Undefined, write 0x00.
saved in the first address of the data variable space, must be an even number.
Mode 0x0003: Replace the data of this touch command with the data starting with 0xB4. The format and data length must be consistent.
0xD4: 0x5AA5 starts a touch screen simulation operation and the CPU is cleared after the operation is completed.
0xD5: Press mode 0x0001 = Press 0x0002 = Release 0x0003 = Continuous press 0x0004 = Click (Press + Lift 0xD6: The x )
coordinate of the press position.
0xD4 Touch screen operation simulation 4
0xD7: The y coordinate of the pressed position.
After the simulated press mode 0x0001 and 0x0003, there must be a simulated lift mode 0x0002. The touch screen (x, y)
coordinates must be set relative to the screen 0° display position, and the CPU automatically handles the display flip.
D7: 0x5A means instruction 1 is valid, the CPU is cleared after operation, and the host computer must query it to be 0x00 before
0xD8 4
Background drawing instruction 1
[Link] PAGE_ID, the valid page ID of instruction 1; 0xFFFF means all pages are valid; [Link] the first address of the
interface
variable storage space storing instruction 1 data, must be an even number, the maximum data size is 4KB. [Link]
Beijing Diwen Technology Co., Ltd. -6- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
4
0xDC
Background drawing instructions 2
Define the background drawing instruction 1 same as 0xD8.
interface
D3: Write 0x5A to perform a memory CRC check, and clear after the CPU operation.
D2: Memory type selection
0x00=font library 0x01=picture 0x02=DWIN OS code 0x03=Nor database (LIB file)
[Link] data interface.
When the user starts CRC
0xE0 Memory CRC check 2 Font verification mode: D1=starting font ID (each font is 256KB); D0=number of 4KB blocks to be verified, 0x00-0xFF Image .
verification mode: D1:D0=image ID.
OS code verification mode: D1:D0=Starting from 0x1000, the byte length of the OS code to be verified, 0x0001-0x7000 Nor .
database verification mode: D1:DO=Nor database ID, a fixed 4KB data is verified each time.
After CRC check is completed
0xE2 SD card read/write interface 8 SD card interface status detection, read and write operation interface.
the storage pointer position of the curve data (0x0000-0x07FF), and the low word stores the effective data length of the curve buffer (0x0000-0x0800).
Writing 0x0000 to the effective data length of the curve buffer will cause the curve not to be displayed.
A single data block is defined as data channel ID (0x00-0x07) + data word length (0x01-0x6E) + data.
After enabling dynamic curve display, a data buffer is created for each curve starting from 0x1000 with 2Kwords per channel. .
The buffer of CH0 is 0x1000-0x17FF, the buffer of CH1 is 0x1800-0x1FFF, and so on.
The buffer area can be used as a user variable area. Users can also directly rewrite the curve buffer data and then modify 0x300-0x30F
The corresponding storage pointer position and data length ensure the correct display of the curve.
0x400-0x4FF Network communication interface 256 WiFi and other Internet communication equipment application control interface.
0x500-0x57F Video surveillance application interface 128 Camera and other video surveillance application control interface.
0x580-0x5FF Digital Video Application Interface 128 Digital video application control interface such as streaming media playback.
This function is enabled after setting the variable change automatic upload function.
0xF00 Variable change indication 2
D3=5A indicates that there is a variable change D2:D1=variable memory pointer D0=variable length (word).
instruction
Serial number Data Format illustrate
( CMD_ID )
1 0x01 The data packet format is (x0, y0, x1, y1, Color). Fills the specified area with the specified color.
For example: Fill the (128, 128) (256, 256) area with red.
5A A5 0D 82 30 00 00 80 00 80 01 00 01 00 F8 00 5A A5 0B 82 00 D8 5A 01 00 00 30 00 00 01
Beijing Diwen Technology Co., Ltd. -7- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
3.2 SD card read and write interface(0x0E2-0x0E7)
long
definition address explain bright
Spend
SD card interface status 0x0E2 2 D3=0x5A means SD card is detected; D2:D0=boot sector location.
0x00: Read SD root directory file and folder information;The root directory must be read once after inserting the card. 0x01:
0x02: Enter the directory data with the specified number under the current directory.
0x03: Read the data of the specified block length starting from the specified (block) position in the file with the specified number in the current directory.
0x04: Update the data of the specified block length in the file with the specified number and the specified (block) position in the current directory.
0x04 The command can only rewrite the contents of the specified area of the selected file and cannot add new contents.
High byte = the number of the selected file or directory in the current directory page, 0x01-directory and file length under the
directory. This parameter is invalid for 0x00, 0x01, 0x05, 0x06 instructions, and any value can be written.
0xE5 1
Low byte = file read and write 4KB data block number, 0x01-0x10, read and write up to 64KB at a time (the data buffer should be set to the corresponding size) This .
SD card read/write interface parameter is invalid for 0x00, 0x01, 0x02, 0x05, 0x06 instructions, and any value can be written.
The directory data is stored in the pointer of the variable memory, which must be an even number and occupies a fixed 4KB space. The root directory must be re-read once before changing. The directory .
storage structure is as follows:
D0: Number of valid directory (file) entries, 0x00-0x7F, up to 127 directory entry data. D1-D31:
Undefined, reserved.
0xE9 1
D32-63: The first directory (file) item information, directly corresponding to the short file directory item data of FAT32, each information is 16
…
D4064: Directory (file) item information No. 127.
0x1A 2 The low 16 bits of the file's starting cluster number LSB Mode
0x1C 4 Length of the file In LSB mode, for example, 5000 bytes are stored as 0x88 0x13 0x00 0x00 .
Example of serial port operation (there are two directories, DWIN_SET1 and PCB, and two files, [Link] and [Link], under the root directory of SD):
(1) 0x00 creates the root directory information (the directory information is in the 2KW storage space starting at 0x9000): 5AA5 0F82 00E4 5A00 0101 0000 0000 8000 9000 (2) After checking
that the high byte of 0xE4 is 0xA5 (processing successful), send 5A A5 04 83 9000 50. The returned data after reading the directory information is as follows:
5A A5 A4 83 90 00 50
04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 //4 directories (files)
54 45 53 54 20 20 20 20 54 58 54 20 18 81 69 B5 02 4D 63 4E 03 00 D7 A9 3D 4D 0B 00 A9 03 00 00 //1 [Link] file
44 57 49 4E 5F 53 7E 31 20 20 20 10 00 97 D6 BC 7A 4D 63 4E 03 00 D7 BC 7A 4D 12 00 00 00 00 00 //2 DWIN_S~1 Directory
41 42 43 44 7E 31 20 20 47 43 4F 20 00 86 27 9F 58 4E 63 4E 00 00 0C A9 63 4E 05 00 09 00 00 00 //3 ABCD~[Link] file
50 43 42 20 20 20 20 20 20 20 20 10 00 B5 A2 B0 24 4E 53 4E 03 00 A3 B0 24 4E 0F 00 00 00 00 00 //4 PCB Directory
(3) Read the first 4KB data (only 9 bytes of valid data) of ABCD~[Link] to the variable memory starting at 0x8000, and send the command:
5AA5 0F82 00E4 5A03 0301 0000 0000 8000 9000 , the detection process is successful and 5AA5 0483 8000 05 is sent. The data is read:
5A A5 0E 83 80 00 05 31 32 33 34 35 36 37 38 39 00 //31-39 is the data saved in the file.
Beijing Diwen Technology Co., Ltd. -8- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
3.3 Network Communication Interface(0x0400-0x04FF)
long
definition address explain bright Recommended value
Spend
Network interface switch 0x400 1 0x5AA5 indicates that the network communication interface is enabled. 5AA5
D5:D4=0x5AA5 means to immediately start uploading the specified RMA space data to the server, and clear it after processing.
RMA Alert 0x401 3 D3:D2=the word address of the RMA variable memory to be uploaded. All 00
D1:D0=the word length of the RMA variable memory to be uploaded.
The time interval for RMA to automatically refresh the server, 0x0000-0xFFFF, unit is 0.1 second.
0x430 1 012C
0x0000 means no automatic refresh is required.
0x431 1 RMA (variable memory mapped to the server) reads the starting address of the space, the word address, and cannot read if it is out of bounds. 1000
Device Description
0x432 1 RMA read space size, unit is 128Words, maximum 64KWords, 0x0000 means reading is prohibited. 0004
(RMA Mapping)
0x433 1 The starting address of the RMA write space can overlap with the read space, and writing is prohibited if it exceeds the boundary. 2000
0x434 1 RMA write space size, unit is 128Words, maximum is 64KWords, 0x0000 means writing is prohibited. 0004
0x435 3 reserve All 00
0x438 1 Remote upgrade interface enabled, 0x5AA5 means the device has enabled the remote upgrade interface, and the system will automatically detect the buffer. 5AA5
0x439 1 Remote upgrade packet timeout configuration, unit is 0.1 second. 0064
The first remote upgradeable space of the device (corresponding to the 1MB Flash of T5, aligned to 4KB) is defined as follows:
D7=0x5A indicates that the remote upgrade space is enabled. 5A00 0180
0x43A 4
D6-D3: 32-bit starting address of upgradeable space (lower 12 bits are 0), up to 0000 00E8
4GB. D2-D0: Size of upgradeable space, unit 4KB, up to 4GB.
5A00 0000
0x43E 4 The second remotely upgradeable space definition of the device corresponds to 128MB (or 512MB) of image and font memory.
0000 8000
0x442 4 The third remote upgradeable space of the device is defined and is not used. All 00
0x446 4 The fourth remote upgradeable space of the device is defined and is not used. All 00
Remote upgrade Buffer interface definition:
D7=0x5A means the remote upgrade buffer is valid.
Device Description
D6=Upgrade mode 0x00=Communication end is responsible for checking data CRC, error frame notifies
(Remote upgrade)
host to resend. D5=Number of buffers available for remote upgrade, 0x01-0x10, up to 16. D4=High byte of
the starting address of Buffer0 (word address), the lower 8 bits of the address is 0x00. Each buffer occupies
D30: The encoding method and length of the device description text.
Communication equipment description 0x480 16 D28: Communication device status, bit definition User defined
D19-D0: Communication device description information in text format, more than 20Bytes.
Communication equipment reserved 0x490 112 Communication device customization, such as WiFi username and password. User defined
The device description information is configured by the corresponding content of the 22 initialization file 0x0800-0x09FF (regardless of whether the 22 file initialization variable buffer function is enabled).
Beijing Diwen Technology Co., Ltd. -9- [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
4 SD port
The SD/SDHC interface of T5UID1 supports downloading and updating of the following files.
DWIN OS Program DWINOS*.BIN For DWIN OS programs, the code must start from 0x1000.
Each ID corresponds to 2KWords memory, and the ID range is 0-79. The database is located in
NOR Flash Database ID+(optional) file [Link] the on-chip NOR Flash, with a size of 160KWords, which can be used to save user data or DWIN
DGUS Touch File 13*.BIN Fixed storage in font location 13, the file size cannot exceed 32Kbytes.
Icon File Icon font ID + (optional) file [Link] Generated by DWIN tool software and saved in the font space.
Music Files Music storage ID + (optional) file [Link] 32KHz 16bit WAV format, saved in the music library space.
BMP picture files Image storage ID + (optional) file [Link] Downloads must be in 24-bit true color format.
256 more fonts, each 256KB, 256 Large 64Mbytes font library.
more music clips, each 128KB. Large 32Mbytes music library space.
The music library space and the font library storage space after number 128 overlap, and each font library space occupies 2 music storage space positions.
The downloaded file must be placed in the root directory of the SD cardDWIN_SETThe card must be in the SD or SDHC folder with 4KB sectors and FAT32 format. The DGUS screen will
immediately detect the SD interface once each time it is powered on, and then detect whether there is a card inserted in the SD interface every 3 seconds.
Beijing Diwen Technology Co., Ltd. - 10 - [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
5 Hardware Profile
The [Link] hardware configuration file uses binary data format and can be edited using software such as UltraEdit, as shown in the following table:
During the calibration process, the UART2 serial port sends data packets with more than 30 0x55 data in
System clock calibration 0x06 2
each packet at 115200bps, 8N1 mode, and 30mS intervals.
0x07=0xAA is the RTC calibration mode. The onboard hardware RTC reference clock is .
calibrated at the factory and does not need to be calibrated during use.
. 7: Touch variable change automatic upload control 0 = no automatic upload 1 = automatic upload.
Backlight standby setting 0x0C = normal brightness 0x0D = standby brightness 0x0E:0F = lighting time, 5mS. At the same time,
0x0C 4 LED_Idle_Set
the normal brightness set by 0x0C is also the power-on brightness value.
0x10 2 Display_Config_En 0x5AA5=Display configuration is valid and has been configured at the factory. Users do not need to configure it.
0x12 1 PCLK_PHS Data latch phase setting: 0x00 = PCLK falling edge 0x01 = PCLK rising edge.
0x13 1 PCLK_DIV Pixel clock PCLK frequency setting, PCLK frequency (MHz) = 500/PCLK_DIV.
0x14 1 H_W
0x15 1 H_S
0x16 2 H_D The horizontal (X-direction) resolution of the screen.
0x1D 1 V_E
0x1E 1 TCON_SEL 0x00 = No need to configure TCON.
0x24 3 Music_Power_On 0x24 = boot music segment position 0x25 = boot music segment number 0x26 = boot volume. Writing
0x27 1 TP_Set_En 0x5A indicates that the current configuration is valid. It has been configured at the factory and users do not need to configure it again.
SD Download Verification 0x30 2 SD_Check_En 0x5AA5 means enabling SD download file quantity check.
Beijing Diwen Technology Co., Ltd. - 11 - [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
0x33 1 Download .BIN font files 0x00-0xFF, excluding code files.
0x34 1 Download .DZK font files 0x00-0xFF
0x35 1 Download .HZK font files 0x00-0xFF
0x36 1 Download .ICO icon files 0x00-0xFF
0x37 1 Download .WAV files 0x00-0xFF
0x38 2 Number of downloaded .BMP files 0x0000-0xFFFF
0x3A 6 reserve Write 0x00
0x40 2 SD_Encrypt_En 0x5AAA means canceling the SD interface encryption, and the SD download directory is restored to DWIN_SET. The encryption
settings will be saved in the screen's Flash and will not be lost when the power is off.
Beijing Diwen Technology Co., Ltd. - 12 - [Link] 400 018 9008 dwinhmi@[Link]
T5UID1Development Guide Ver3.0
Appendix 1 Revision History
2018.02.28 Added the function of inputting Chinese pinyin in GBK encoding. V1.5
Added dynamic curve display function.
Added support for sliding gestures to turn pages, and automatically upload page IDs after page switching. Added
2018.03.10 touch command opening, closing, reading, and modifying interfaces. V1.6
Added the display brightness adjustment function of the specified area to highlight or fade the specified area.
Added variable icon display/animated icon display/slider scale indication/artistic text variable display. Added icon and background display composite overlay and
2018.04.08 V2.0
transparency setting functions.
Added transparency settings for variable data entry, pop-up menu selection, and ASCII text entry pop-up area. Added
touch screen operation simulation function (0xD4 system variable) to facilitate process control or keyboard UI operation.
2018.06.22 Added support for full-screen sliding gestures to turn pages, where you can drag the buttons to turn pages after overlaying the touch buttons. V2.2
2018.09.05 0x03 Art word variable display, 0x10 Data variable display adds support for single-precision and double-precision floating point numbers. V2.4
Added 0x13 HEX display variable, 0x14 text scrolling display variable. Added 0x16 non-aliased text display
based on DGUS II font library. Added background drawing instructions to 0x00D8 and 0x00DC system
2018.11.16 V2.5
variable spaces. Added memory verification function to 0x00E0 system variable space to facilitate remote
upgrade inspection.
Added network communication interface 0x0400, which can be directly connected to DWIN Cloud through DWIN WiFi module;
2019.03.08 V2.7
Added digital multimedia video and analog surveillance video control interface 0x500;
Added 0x21_08 Drawing_Closed Area Fill instruction to implement interval cutting UI applications such as pie charts.
If you have any questions when using this document or DWIN products, or want to know more new information about DWIN products, please contact us in time: 400
Thank you for your continued support for DWIN. Your support is the driving force for our progress!
Beijing Diwen Technology Co., Ltd. - 13 - [Link] 400 018 9008 dwinhmi@[Link]