0% found this document useful (0 votes)
274 views47 pages

DGUS Development Guide - V3.1.0

This document provides an overview and instructions for developing graphical user interfaces (GUIs) using DGUS modules. It discusses hardware components, serial communication protocols, data formats, and touchscreen configuration files that define variables and controls. The development process involves using configuration software to create files that program the DGUS's behavior and interface without complex code. This makes GUI development for automation projects faster and easier than traditional methods.

Uploaded by

Tamás Péntek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
274 views47 pages

DGUS Development Guide - V3.1.0

This document provides an overview and instructions for developing graphical user interfaces (GUIs) using DGUS modules. It discusses hardware components, serial communication protocols, data formats, and touchscreen configuration files that define variables and controls. The development process involves using configuration software to create files that program the DGUS's behavior and interface without complex code. This makes GUI development for automation projects faster and easier than traditional methods.

Uploaded by

Tamás Péntek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Professional, Creditable, Successful DGUS Development Guide V3.1.

DGUS Development Guide


V3.1.0

November, 2012

Contents
INTRODUCTION ....................................................................................................................................2
1 Hardware .............................................................................................................................................4
1.1 SD Card Slot ....................................................................................................................................................... 4
1.2 CONFIG.TXT ....................................................................................................................................................... 5

AMP DISPLAY INC. 1 www.ampdisplay.com


1.3 Memory Space .................................................................................................................................................... 7
1.4 Firmware Upgrade.............................................................................................................................................. 9
1.5 Touch Screen Calibration ................................................................................................................................ 10
1.6 Enable/Disable SD Card ................................................................................................................................. 10
1.7 User program based on DWIN OS ................................................................................................................ 11
2 Serial Port .........................................................................................................................................12
2.1 Data Frame........................................................................................................................................................ 12
2.2 Command Set ................................................................................................................................................... 12
3 Data Format ......................................................................................................................................13
4 Touch Config. File (13.BIN) ..........................................................................................................14
4.1 Variable Data Input (0x00) .............................................................................................................................. 14
4.2 Popup Window (0x01) ..................................................................................................................................... 16
4.3 Incremental Adjustment (0x02)....................................................................................................................... 17
4.4 Slider Adjustment (0x03) ................................................................................................................................. 18
4.5 The RTC Settings (0x04)................................................................................................................................. 19
4.6 Return Key Code (0x05).................................................................................................................................. 20
4.7 Text Input (0x06) ............................................................................................................................................... 21
4.8 Firmware Parameter Settings (0x07) ............................................................................................................ 23
5 Variable Config. File (14.BIN) .......................................................................................................24
5.1 Variable Icon...................................................................................................................................................... 24
5.1.1 Variable Icon (0x00) .............................................................................................................................. 24
5.1.2 Animation Icon (0x01) ........................................................................................................................... 25
5.1.3 Slider (0x02) ........................................................................................................................................... 26
5.1.4 WordArt (0x03) ...................................................................................................................................... 27
5.1.5 Image Animation (0x04) ....................................................................................................................... 28
5.1.6 Icon Rotation (0x05).............................................................................................................................. 29
5.1.7 Bit Variable Icon (0x06) ........................................................................................................................ 30
5.2 Text Variable ...................................................................................................................................................... 31
5.2.1 Data Variable (0x10) ............................................................................................................................. 31
5.2.2 Text (0x11) .............................................................................................................................................. 32
5.2.3 RTC (0x12) ............................................................................................................................................. 33
5.2.4 Timer Variable (0x13)............................................................................................................................ 34
5.3 Graphic Variable ............................................................................................................................................... 35
5.3.1 Dynamic Trend Curve (0x20)............................................................................................................... 35
5.3.2 Basic Graphic Display (0x21) .............................................................................................................. 36
5.3.3 Table Display (0x22) ............................................................................................................................. 40
5.3.4 Special Industrial Application (0x23)................................................................................................... 41
6 Development Steps ........................................................................................................................42
Appendix: DGUS Main Functions ..................................................................................................45
Professional, Creditable, Successful DGUS Development Guide V3.1.0

INTRODUCTION
DGUS is a brand-new GUI software platform based on DWIN K600+ kernel which developed and
authorized by DWIN Technology with own proprietary. Under DWIN system, GUI designs and
developments for communicating with user’s host could be achieved by DGUS_SDK, DWIN Toolbox that
specialized in visual interface and easy-use operation, it saves engineers from complicated programming
and takes less time for whole products developments.

Framework of DGUS System

Differing from traditional LCMs which manage the display by commands or timing sequence, GUI in DGUS
module is accomplished by real-time variables. All the feature of operation and display are defined in
preinstalled programmable Config. files. Software flow charts of different development methods for
temperature controller are shown as below.

AMP DISPLAY INC. 2 www.ampdisplay.com


Professional, Creditable, Successful DGUS Development Guide V3.1.0

As above information illustrated the DGUS’s easy-usage and quick convenience as compared with
traditional development, let alone animations, icons, and other factors on screen are considered.

In some medium and small projects of automation, DGUS module can act as host of other modules in a
RS485 network. DGUS module can even work as a microcontroller by DWIN OS running which is a DWIN’s
own programming system.

The whole development procedure is accomplished with DGUS_SDK_V3.4, configuration software for PC
for creating Config.files for DGUS module.

DGUS NEW FEATURES


Development with DGUS is different from previous commands.
A. Pictures are downloaded in a flash as background of GUI.
B. Controls are integrated in DGUS module, so most of operation and calculation is independent from
microcontroller.
C. Concept of variables is introduced and properties of variables are predefined by config files. By
updating data in flash, screens are refreshed synchronously.
D. Config files are downloaded by SD card, making the interface easier to have an overall outlook.
E. Properties of module and variables can be modified freely by commands or touchscreen.

AMP DISPLAY INC. 3 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

1 Hardware

1.1 SD Card Slot


All files should be downloaded in DGUS Modules by SD or SDHC card in FAT32 file format.

File Format
 Create a <DWIN_SET> folder in root directory of SD card.
 Copy all the pictures, fonts and config files into <DWIN_SET> folder, as shown below.
 Plug SD card into slot on module to download files.

SD Card File Format

File Type Naming Rule Example Description

24-bit BMP pictures with same


Picture ID+ (optional) file
Pictures 00_starting page.BMP resolution of DWIN module are
name.BMP
required
Font ID+ (optional) file
Fonts 32_ASCII. DZK Generated by the Font Generator
name.BIN/DZK/HZK

Icon file ID+ (optional) file Generated by DWIN Toolbox


Icon Library 41_iconlibrary. ICO
name.ICO "DWICON"

Generated by DWIN Toolbox "No.0


Default ASCII 0*.HZK 0_DWIN_ASC.HZK
font library".

Touch 13_touch configuration


13*.BIN Generated by DGUS_SDK.
configuration file.BIN

Variable 14_variables configuration


14*.BIN Generated by DGUS_SDK.
configuration file. BIN

Variables
22*.BIN 22_Initialization.BIN
Initialization

User Code 23*.BIN 23_Water_Treatment.BIN Base on DWIN OS.

Hardware
CONFIG.TXT CONFIG.TXT
settings

AMP DISPLAY INC. 4 www.ampdisplay.com


Professional, Creditable, Successful DGUS Development Guide V3.1.0

1.2 CONFIG.TXT
CONFIG.TXT adopts a kind of method like scripting language to describe parameter register. Each
parameter will be stated line by line while no need to write unused parameters, as shown below.
Name of Parameter
Register
Range Description
R0 Module driver mode, unnecessary for modification.
Baud rate setting, 0x00-0x10 matchup with 1200bps -921600bps.
R1 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08
R1 0x00-0x11 Baud rate 1.2K 2.4K 4.8K 9.6K 19.2K 38.4K 57.6K 115.2K 28.8K
R1 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11
Baud rate 76.8K 62.5K 125K 250K 230.4K 345.6K 691.2K 921.6K Defined

R2 0x00-0xFF Refer to the following table.


R3 0x00-0xFF UART_SYNC_H, High byte of frame header.
R4 Module driver mode, unnecessary for modification.
When R1=0x11, high byte of baud rate configuration.
R5:R9=625000/user-defined baud rate.
R5 0x00-0xFF
E.g.: set baud rate as 10000bps, R5:R9=6250000/10000=625=0x0271, R5=0x02,
R9=0x71.
R6 0x00-0x40 Brightness of backlight.
R7 0x00-0x40 Brightness of backlight at sleep mode.
R8 0x01-0xFF Time before activating sleep mode.
R9 In Flux When R1=0x11, low byte of baud rate configuration.
RA 0x00-0xFF UART_SYNC_L, Low byte of frame header.
All parameters should be 2-digit hexadecimal numbers.

AMP DISPLAY INC. 5 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

 R2 (SYS_CFG configuration Byte)


Bit Ratio Definition Description
0=Normal display.
.7 0x80 VDS
1=90° Rotation.
0=Normal Display.
.6 0x40 HDS
1=180° Rotation (upside down).
0=Disable sleep mode.
.5 0x20 TP_LED
1=Enable sleep mode if no operation.
0=Disable CRC16 checksum in the serial communication.
.4 0x10 FCRC
1= Enable CRC16 checksum in the serial communication
0=Disable auto-upload of key code or data.
.3 0x08 TPSAUTO
1=Enable auto-upload of key code or data.
0=Initialize 56KB access variable data to 0x00.
.2 0x04 L22_Init_En
1=Initialize 56KB access variable data from 22*.bin.
0=Refresh cycle at 200ms.
.1 0x02 FreshTime_Sel 1=Refresh cycle at 250ms.
Default setting: 0.
0=Normal mode.
.0 0x01 RunMode_Sel 1=High-speed mode (Power consumption will rise by about 100mW).
Default setting: 0.

 VDS and HDS Control Panel Display Mode

 Example of Config. File

R1=07 ; Baud rate, 0x07: 115200bps.


R2=20 ; SYS_CFG, enable sleep mode if no operation.
R6=40 ; Brightness of backlight, 0x40: 100% brightness.
R7=10 ; Brightness of backlight of sleep mode, 0x10: 25% brightness.
R8=14 ; Light-up time,units: 1.0 seconds,0x14=20 seconds.
R3=A5 ; High-byte of frame header: 0xA5.
RA=5A ; Low-byte of frame header: 0x5A.

AMP DISPLAY INC. 6 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
1.3 Memory Space
 Font Library
A 32MB flash memory, divided into 128 addresses, is designed for font library. Each address occupies
256KB, corresponding with address from 0 to 127.
Font ID size Description Example
0 3072KB #0 ASCII font. 0_DWIN_ASC.HZK
13 256KB 13 touch configuration file 13_Touch.BIN
14 variable configuration files (up to1024
14 2048KB 14_VAR.BIN
pages with max. 64 variables per page).
Variable initializing file for the initial value
22 256KB 22_variable initializing.BIN
of 56KB access variable.
23 256KB User program based on DWIN OS. 23_Software.BIN
Font, icon library (64-127 space can be
24-127 26MB User defined
use as database).
Export the data from Font ID 32-127 via SD card interface: create a file naming after Font ID in
<DWIN_SET> folder with the extension “.DAT” (e.g.: 32_test.DAT), the minimum size should be 256KB.
The corresponding font data will be written into the first 256KB space of the file.

 Image Space
A 224MB flash memory (256MB K600+), extendable to 2016MB (2GB K600+), is designed for images.
Screen Resolution 256MB K600+ 2GB K600+
320×240 869 7807
480×272 869 7807
640×480 290 2602
800×480 290 2602
800×600 217 1952
1024×600 174 1561
1024×768 145 1301

AMP DISPLAY INC. 7 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
 Register
A 256B register is designed for hardware setting and process control. Refer to the table below:
Register Length
Address
Definition
(Byte)
Description
0x00 Version 1 DGUS version number, BCD format, 0x10 indicates V1.0.
0x01 LED_NOW 1 LED brightness, 0x00-0x40.

0x02 BZ_TIME 1 Buzzer beeping time, by every 10ms.


Read: read current picture ID.
0x03 PIC_ID 2
Write: jump to appointed picture.
0x5A: there is update of touching coordinates.
Others: no updating.
0x05 TP_Flag 1
Touchpanel data is no longer updated if user did not clear the flag after data
reading.
0x01: first click.
0x03: pressing down.
0x06 TP_Status 1
0x02: uplift pressing.
Others: null.
0x07 TP_Position 4 Coordinate of touching position: X_H:L, Y_H:L.
0x00: disable the touchpanel.
0x0B TPC_Enable 1 Others: enable the touchpanel.
Default setting: 0xFF.
0x0C-0x0F Reserve 4 Undefined.
0x10-0x1A R0-RA 11 Mapping of SD card config. register, read only.
0x5A: RTC data is rewritten through serial port, clear after RTC auto
0x1F RTC_COM_ADJ 1
updating.
0x20 RTC_NOW 16 YY:MM:DD:WW:HH:MM:SS
Send serial command to modify current time, e.g.: A5 5A 0A 80 1F 5A 12 10 25 0412 00 01. (BCD Format) “04” means
Thursday, it can be written as any day you choose.
0x30-0x3F Reserve 16 Undefined.
0x40 En_Lib_OP 1 0x5A: applying writing in font flash memory, clear after operation.
0x50: Transfer data from variable flash to font flash memory.
0x41 Lib_OP_Mode 1
0xA0: Transfer data from font flash memory to variable SRAM.
Designate font address for data exchange. (0x40-0x7F) Every font space is
0x42 Lib_ID 1
128KW, the maximum Flash space is 8MW (16MB).
Designate address in font library for data exchange. Specified the first
0x43 Lib_Address 3
(word) address for data operation in font storage, 0x00:00:00-0x01:FF:FF.
0x46 VP 2 Designate variable SRAM addresses for data exchange. 0x00:00-0x6F:FF.
0x48 OP_Length 2 Length of exchanged data, by word. 0x00:01-0x6F:FF.
Save 1KW variable data string starting from 0x1000 address into #64 font ID with starting 0x0000 address, send serial
command: A5 5A 0C 80 40 5A 50 40 00 00 00 10 00 02 00.
0x4A Timer0 2 16-bit software timer, in term of 4ms, auto-decrement to 0.

0x4C Timer1 1 8-bit software timer, in term of 4ms, auto-decrement to 0. Maximum


error is
0x4D Timer2 1 8-bit software timer, in term of 4ms, auto-decrement to 0. +/-4ms.

0x4E Timer3 1 8-bit software timer, in term of 4ms, auto-decrement to 0.


Address of key code for 13 touch control config. file, 0x00: null.
0x4F Key_code 1
Clear after operation executed.
0x50-0xFF Reserve 182 Undefined.
Register space accessed by Command 0x80/0x81

 Variable
56KB variable SRAM, which can be used as extended RAM, is designed to save data for variables. Variable
SRAM is divided into 28672 addresses from 0x0000 to 0x6FFF. Data in variable SRAM can be written by
command 0x82 and read by command 0x83, one address once at least.

AMP DISPLAY INC. 8 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
 Trend Curve Data Buffer
Trend curve data buffer is designed to store trend curve data. Data in trend curve buffer is written only by
command 0x84. One word once at least. Data of each point is defined by a 2-byte unsigned integer.
Trend curve buffer will not occupy the variable SRAM. Maximum buffer for 8 trend curves can be updated
simultaneously.

1.4 Firmware Upgrade


Essential Facilities:
 DC regulated power supply.
 Serial port cable.
 Computer which has a hardware serial port and serial debugging assistant SSCOM3.2 or any similar
software.
Serial port and SSCOM3.2 are not necessary if upgrade firmware via SD card.

Procedures of Upgrade:
A. Power off DGUS module and connect module with PC via serial port.
B. Open the SSCOM3.2 and click "Open File" to select a DGUS bin file, such as DGUS_V3.5.BIN.
C. Write "DWIN_M600_BOOT!" in data input column and set send-eve interval to 10ms/Time.
D. Select "Send New" and "Send eve", then power DWIN module again.
E. The serial port will receive "Erase ......”. If no response, please check the connection.
F. It will receive "Please Tx File!" after one second, then hook off "Send New" and click "Send File".
G. Wait another 3 to 10 seconds. If the serial port receives "***************END***************", it means the
download is finished.
H. Restart the module. Upgrade finished.

Upgrade your DGUS firmware by SD card is STRONGLY RECOMMENDED for V2.0 and higher version.

Check Firmware Version:


A. Physically, connect DGUS HMI serial port with COM port on PC, and connect power properly.
B. Open the SSCOM3.2 and make sure that "SendHEX" and "HexData" are ticked.
C. Then write command in data input column: "Frame_Header (2 Bytes) 03 81 00 01" and press “SEND”
button.

AMP DISPLAY INC. 9 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
D. Your computer will receive a feedback message like "Frame_Header (2 Bytes) 03 81 00 XX". The
number XX is the version number in BCD format. If it's 10, that means V1.0, if 35, means V3.5.

1.5 Touch Screen Calibration


Tap touch screen 20 times in 4 seconds in none-button area to activate calibration mode.

 Quickly tap the touch screen more than 20 times in 4 seconds.


Note: do not click button area.
 Click until a long beep from the buzzer.
For the models without buzzer, user can time for 4 seconds or judge by if the variables are refreshed.
 Click particular position on touch screen to calibrate.
 Calibration finished and back to the starting page.

1.6 Enable/Disable SD Card


Specific codes in CONFIG.TXT can be used to disable SD card slot on DGUS module with password to
avoid accidental operation.
Code to Disable SD Card Description
Part 1 SD_LOCK Fixed.
Password address in variable SRAM, 0x0000 –
Part 2 1000
0x6FF8.
Part 3 ABCD1234 Password to re-enable SD card, 8 bytes.
Code in CONFIG.TXT to re-able SD card: SD_UNLOCK.

E.g.: presume password is 12345678, saved in 0x6000 address in variable SRAM.

Steps to disable SD card:


1. Write SD_LOCK_6000_12345678 to CONFIG.TXT.
2. Copy CONFIG.TXT into DWIN_SET folder in SD card.
3. Plug SD card into slot on DWIN module to disable it.

Steps to re-enable SD card:

Method 1: Send password to module via serial port to activate SD card once.
We take 0xA55A as frame header, send command: A5 5A 0B 82 60 00 31 32 33 34 35 36 37 38.

Method 2: Using <Text Input> to type password can activate SD card once.

Please remember the password or DGUS module will be locked permanently.


AMP DISPLAY INC. 10 www.ampdisplay.com/
Professional, Creditable, Successful DGUS Development Guide V3.1.0
Format your SD card: if part of your data in SD card is not downloaded into module, please format your SD
card as the instruction below.

Step 1: open RUN function in Windows and run DOS using “command”.

Step 2: type command to format: “format/q g:/fs:fat32/a:4096”, and click <enter> to finish formatting.

The letter in red is the disk number of SD card.

1.7 User program based on DWIN OS

Backstage user program is supported by DGUS module with DWIN OS function. User program, including
maximum 32764 commands, is saved in address #23 in font flash memory. Specific codes in CONFIG.TXT
can be used to disable/enable user program.

Enable user program: RUN_DWIN_OS.


Disable user program: STOP_DWIN_OS.

Executing cycle of user program is the same with refresh cycle of variables (200ms or 250ms). Please refer
to <DWIN OS Development Guide> to get detailed information.

AMP DISPLAY INC. 11 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

2 Serial Port
Serial mode of DGUS module is asynchronous, full duplex serial port (UART). Each byte occupies 10 bits: 1
stars bit, 8 data bit, and 1 stop bit.

Baud rate can be defined by SD card. All data transfer is in hexadecimal format with MSB priority. E.g.:
transferring 0x1234, 0x12 will be transferred first, then 0x34 after.

Busy pin is invalid for DGUS module, keep it unconnected.

Volume of serial FIFO buffer is 4KB, minimum capacity of data transfer in DGUS circle (200ms or 250ms).
Maximum capacity depends on the complexity of GUI.

DWIN recommends sending no more than 4KB data to DGUS module in a DGUS circle.

2.1 Data Frame


Data frame is made up by 4 parts, shown as below.
Data 1 2 3 4 5
CRC checksum of the
Definition Frame Header Data length Command Data
command and data
Data
2 1 1 N 2
Length

Defined by R3 & RA in Data length, including Defined by R2 in


Description 0x80-0x84
CONFIG.TXT command, data and checksum CONFIG.TXT

CRC checksum is only available for command and data, rather than data length and frame header, with
ANSI CRC-16(X16+X15+X2+1) format.

2.2 Command Set


Function CMD Data Description
0x80 ADR(0x00-0xFF)+Data_Pack Write data in designated addresses in register.
Access
ADR(0x00-0xFF)+RD_LEN(0x00-0xFF) Read data in designated addresses in register.
Register 0x81
ADR(0x00-0xFF)+RD_LEN+Data_Pack Response of DGUS module.
Write data in designated addresses in variable
0x82 ADR_H:L(0x0000-0x6FFF)+DATA0…DATAn
Access SRAM.
Variable ADR_H:L(0x0000-0x6FFF)+RD_LEN(0x00-0x Read data in designated addresses in variable
SRAM 0x83 7F) SRAM.
ADR_H:L+RD_LEN+DATA0……DATAn Response of DGUS module.
Write data in trend curve buffer.
CH_Mode defines channels for trend curve
channel of follow-up data order:
 Each bit of CH_Mode corresponds to one
channel; e.g.: CH_Mode .0 corresponds to
Trend channel 0, .7 corresponds to channel 7
Curve 0x84 CH_Mode(Byte)+DATA0(Word)+…+DATAn  1 in particular bit indicates the presence of the
Buffer corresponding channel.
 Data of lower channel is prior ranged.
e.g.: CH_Mode = 0x83 (10000011B),
indicates a follow-up data format :
( channel 0 + channel 1+ channel 7) +...+
(channel 0 + channel 1+ channel 7).
Data of register is written/ read by byte, data of variable SRAM is written/read byword and trend curve buffer
is also written by word.
For further information, please refer Chapter 1.3.

AMP DISPLAY INC. 12 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

3 Data Format
To make it easier for calculation of MCUs, all the data in DGUS module is in integer, unsigned integer or
long integer format.

Integer: -32768 (0x8000) to +32767 (0x7FFF).


Unsigned integer: 0 (0x0000) to 65535 (0xFFFF).
Long integer: -2147483648 (0x80000000) to +2147483647 (0x7FFFFFFF).
Decimal numbers are represented by fix-point decimals for example: 0x4D2(1234) indicates 12.34 if there
are two decimal digits.

16-bit color system is adopted by DGUS module refers to chart below view definition of color palette.
65K-color Definition
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R4 R3 R2 R1 R0 G5 G4 G3 G2 G1 G0 B4 B3 B2 B1 B0
Define
Red 0xF800 Green 0x07E0 Blue 0x001F

AMP DISPLAY INC. 13 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

4 Touch Config. File (13.BIN)


Touch Config. File, containing several touch commands, can be generated by DGUS_SDK. Each command
occupies 16, 32 or 48 bytes and includes 6 parts.
Data
Part Definition Description
Length
1 Pic_ID 2 Picture ID
Touch button area: (Xs, Ys) (Xe, Ye).
2 TP_Area 8 Xs=FFFF: the function of the button will be activated by key code in register
0xF4, set Ys_H as key code then disable press-down effect.
Picture jump to.
3 Pic_Next 2
0xFF**: disable picture switch.
Press-down effect.
4 Pic_On 2
0xFF**: disable press-down effect.
Touch key code:
0xFF**: Invalid key code.
5 TP_Code 2
0xFE**: Function buttons, e.g.: 0xFE00 indicates it’s a Variable Data Input button.
0x00**: Touch key code in ASCII format, e.g.: 0x0031 means “1”.
6 TP_FUN 16/32 When TP_Code = 0xFE**, parameters of functional buttons.

4.1 Variable Data Input (0x00)


Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
Picture jump to.
0x0A Pic_Next 2
0xFF**: disable picture switch.
Press-down effect.
0x0C Pic_On 2
0xFF**: disable press-down effect.
0x0E TP_Code 2 0xFE00
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable pointer.
Inputted variables format.
0x00: integer (word).
0x13 V_Type 1 0x01: long integer (double word).
0x02: unsigned byte (high byte of VP address).
0x03: unsigned byte (low byte of VP address).
0x14 N_Int 1 Integer digits, e.g.: input 1234.56, so N_Int = 0x04.
0x15 N_Dot 1 Decimal digits, e.g.: input 1234.56, so N_Dot = 0x02.
0x16 (x,y) 4 Position of cursor, right alignment.
0x1A Color 2 Font color.
0x1C Lib_ID 1 Address of ASCII Font file, 0x00: default #0 ASCII font.
0x1D Font_Hor 1 Font size, by pixel numbers in X-direction.
Cursor color.
0x1E Cusor_Color 1
0x00: black, others: white.
0x1F Hide_En 1 0x00: encrypted display, others: unencrypted display.
0x20 0xFE 1 0xFE
0x00: call keypad from current page.
0x21 KB_Source 1
Others: call keypad from designated page.
Picture ID of keypad.
0x22 PIC_KB 2
Null if KB_Source = 0x00.
Cut area for keypad (Xs, Ys) (Xe, Ye).
0x24 AREA_KB 8
Null if KB_Source = 0x00.
Paste position of keypad on current page.
0x2C AREA_KB_Position 4
Null if KB_Source = 0x00.
0x30 0xFE 1 0xFE
0xFF: enable range limit of inputting value, null if over range.
0x31 Limits_En 1
Others: disable range limit.
0x32 V_min 4 Floor of range (long integer, 4 bytes).
0x36 V_max 4 Ceiling of range (long integer, 4 bytes).
0x3A Reserve 6 0x00 fixed.
Valid key codes: 0x0030 – 0x0039 (Number 0 - 9), 0x002E (.), 0x002D (+/-), 0x00F0 (cancel), 0x00F1 (confirm),
0x00F2 (backspace).

AMP DISPLAY INC. 14 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

Call keypad from current page (KB_Source = 0x00).

Call keypad from designated page (KB_Source = 0x01): keypad is activated after click.

Call keypad from designated page (KB_Source = 0x01): page with keypad.

AMP DISPLAY INC. 15 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
4.2 Popup Window (0x01)
Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
Picture jump to.
0x0A Pic_Next 2
0xFF**: disable picture switch.
Press-down effect.
0x0C Pic_On 2
0xFF**: disable press-down effect.
0x0E TP_Code 2 0xFE01
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable pointer.
Key code format.
0x00: write key code in VP address (word).
0x01: write low byte of key code in high byte of VP.
0x13 VP_Mode 1
0x02: write low byte of key code in low byte of VP.
0x10-0x1F: write data from last bit of key code into designated bit of VP
address. (0x10 corresponds to VP.0, 0x1F corresponds to VP.F)
0x14 Pic_Menu 2 Picture ID of popup window.
0x16 AREA_Menu 8 Cut area for popup window: (Xs, Ys) (Xe, Ye).
0x1E Menu_Position_X 2 Paste position of popup window: X coordinate.
0x20 0xFE 1 0xFE
0x21 Menu_Position_Y 2 Paste position of popup window: Y coordinate.
0x23 NULL 13 0x00 fixed.
Valid key code: 0x0000 – 0x00FF, 0xFF: cancel.

Key code (0x0000 – 0x00FE) of “Start” and “End” button will be written in VP address. Designate 0x00FF
key code for “Esc” button.

AMP DISPLAY INC. 16 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
4.3 Incremental Adjustment (0x02)
Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
0x0A Pic_Next 2 0xFF**.
Press-down effect.
0x0C Pic_On 2
0xFF**: disable press-down effect.
0x0E TP_Code 2 0xFE02
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable pointer.
Adjust value mode.
0x00: adjust value in VP address (integer).
0x01: adjust value in high byte of VP address (unsigned byte).
0x13 VP_Mode 1
0x02: adjust value in low byte of VP address (un signed byte).
0x10-0x1F: adjust value in designated bit of VP address. (0x10 corresponds
to VP.0, 0x1F corresponds to VP.F) Step size must be 0 or 1.
Adjust mode.
0x14 Adj_Mode 1
0x00: --, others: ++.
Loop.
0x15 Return_Mode 1
0x00: disable loop, others: enable loop.
0x16 Adj_Step 2 Step size: 0x0000-0x7FFF.
0x18 V_Min 2 Floor of range (integer), low byte is valid when VP_Mode is 0x01 or 0x02.
0x1A V_Max 2 Ceiling of range (integer), low byte is valid when VP_Mode is 0x01 or 0x02.
0x1C NULL 4 0x00 fixed.

Set two buttons for “+” (Adj_Mode=0x01) and “–“ (Adj_Mode=0x00).

AMP DISPLAY INC. 17 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
4.4 Slider Adjustment (0x03)
Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
0x0A Pic_Next 2 0xFF**
0x0C Pic_On 2 0xFF**
0x0E TP_Code 2 0xFE03
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable pointer.
 First 4 bits define data format.
0x0*: adjust value in VP address (integer).
0x1*: adjust value in high byte of VP (unsigned byte).
0x13 Adj_Mode 1 0x2*: adjust value in low byte of VP (unsigned byte).
 Last 4 bits define sliding mode.
0x*0: horizontal.
0x*1: vertical.
0x14 Area_Adj 8 Effective sliding area (Xs, Ys) (Xe, Ye), should equal to value of TP_Area.
0x1C V_begin 2 Start return value (integer).
0x1E V_end 2 End return value (integer).
Slider is activated after holding for 0.5 second to avoid mis-operation.

Slider function is applied to indicate current volume (refer to Chapter 5.1.3).

Values can also be indicated by <Data Variable> function to have exact current value (refer to Chapter
5.2.1).

AMP DISPLAY INC. 18 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
4.5 The RTC Settings (0x04)
Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
Picture jump to.
0x0A Pic_Next 2
0xFF**: disable picture switch.
Press-down effect.
0x0C Pic_On 2
0xFF**: disable press-down effect.
0x0E TP_Code 2 0xFE04
0x10 0xFE 1 0xFE
0x11 0x00 00 00 3 0x00 00 00 fixed.
0x14 (x, y) 4 Position of cursor, right alignment.
0x18 Color 2 Font color.
0x1A Lib_ID 1 Address of font file.
0x1B Font_Hor 1 Font size, by pixel numbers in X-direction.
Cursor color.
0x1C Cursor_Color 1
0x00: black, others: white.
0x00: call keypad from current page.
0x1D KB_Source 1
Others: call keypad from designated page.
Picture ID of keypad.
0x1E PIC_KB 2
Null if KB_Source = 0x00.
0x20 0xFE 1 0xFE
Cut area for keypad (Xs, Ys) (Xe, Ye).
0x21 AREA_KB 8
Null if KB_Source = 0x00.
Paste position of keypad on current page.
0x29 AREA_KB_Position 4
Null if KB_Source = 0x00.
0x2D NULL 3 0x00 fixed.
Parameters are basically same with function <Variable Input>.

AMP DISPLAY INC. 19 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
4.6 Return Key Code (0x05)
Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
Picture jump to.
0x0A Pic_Next 2
0xFF**: disable picture switch.
Press-down effect.
0x0C Pic_On 2
0xFF**: disable press-down effect.
0x0E TP_Code 2 0xFE05
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable pointer.
Adjust value mode.
0x00: adjust value in VP address (integer).
0x01: adjust value in high byte of VP address (integer).
0x13 VP_Mode 1
0x02: adjust value in low byte of VP address (integer).
0x10-0x1F: write data from last bit of key code into designated bit of VP
address. (0x10 corresponds to VP.0, 0x1F corresponds to VP.F)
0x14 Key_Code 2 Return key code.
0x16 NULL 10 0x00 fixed.

AMP DISPLAY INC. 20 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
4.7 Text Input (0x06)
Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
Picture jump to.
0x0A Pic_Next 2
0xFF**: disable picture switch.
Press-down effect.
0x0C Pic_On 2
0xFF**: disable press-down effect.
0x0E TP_Code 2 0xFE06
0x10 0xFE 1 0xFE
0x11 *VP 2 Variable pointer.
Max length of text, by word (0x01-0x7B).
0x13 VP_Len_Max 1 0xFFFF as end mark will be added at the end of text.
Max address number of text should be VP_Len_Max + 1
Input mode.
0x14 Scan_Mode 1
0x00: re-input, 0x01: modify existing text.
0x15 Lib_ID 1 Address of font file.
0x16 Font_Hor 1 Font size, by pixel numbers in X-direction.
Font size, by pixel numbers in Y-direction.
0x17 Font_Ver 1
Should be 2 times of pixels in X-direction if Lib_ID = 0x00.
Cursor color.
0x18 Cusor_Color 1
0x00: black, others: white.
0x19 Color 2 Text color.
0x1B Scan_Area_Start 4 Top-left coordinates of text (Xs, Ys).
0x55: save input terminator and valid data length at (VP-1) position.
High byte in (VP-1) for input terminator: 0x5A indicates input is finished, other
Scan_Return_Mod
0x1F 1 value shows input is in-process.
e
Low byte in (VP-1) data length for valid input, counted in bytes.
0x00: disable input status return.
0x20 0xFE 1 0xFE
0x21 Scan_Area_End 4 Bottom-right coordinates of text (Xe, Ye).
0x00: call keypad from current page.
0x25 KB_Source 1
Others: call keypad from designated page.
Picture ID of keypad.
0x26 PIC_KB 2
Null if KB_Source = 0x00.
Cut area for keypad (Xs, Ys) (Xe, Ye).
0x28 AREA_KB 8
Null if KB_Source = 0x00.
0x30 0xFE 1 0xFE
Paste position of keypad on current page.
0x31 AREA_KB_Position 4
Null if KB_Source = 0x00.
0x35 DISPLAY_EN 1 0x00: unencrypted display, 0x01: encrypted display.
Note: the pre-loaded #0 font includes all the ASCII codes in the following pixels, 4*8 to 64*128.

AMP DISPLAY INC. 21 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
Key code table for text input
Key code consists 2 bytes. Low byte indicates lower-case letters, while high byte indicates capital letters.
Refer to the table below to see key code table. All key codes follow ASCII table.
Key Ordinary Capital Key Ordinary Capital Key Ordinary Capital Key Ordinary Capital
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
0x5F2D - _ 0x7D5D ] } 0x0D0D Enter Enter
0x2B3D = + 0x7C5C \ |
Note: The key code of text input should be less than 0x80 (ASCII code). Key code “0x0D” will be automatically transferred into
0x0D 0x0A. Key code 0x00 and 0xFF: null.

Function keys
Key Definition Description
0x00F0 Cancel Cancel the operation, no affect to variable data.
0x00F1 Return Save the input text to the designated address and return.
0x00F2 Backspace Backspace, delete one character.
0x00F3 Delete Delete.
0x00F4 CapsLock Caps lock. Must assign the button effect to enable it.
0x00F7 Left Cursor forwards for one character.
0x00F8 Right Cursor backwards for one character.

AMP DISPLAY INC. 22 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
4.8 Firmware Parameter Settings (0x07)
Data
Address Definition Description
Length
0x00 Pic_ID 2 Picture ID.
0x02 TP_Area 8 Touch button area: (Xs, Ys) (Xe, Ye).
Picture jump to.
0x0A Pic_Next 2
0xFF**: disable picture switch.
Press-down effect.
0x0C Pic_On 2
0xFF**: disable press-down effect.
0x0E TP_Code 2 0xFE07
0x10 0xFE 1 0xFE
0x11 Mode 1 Setup mode selection, see following mode.
0x12 DATA_PACK 14 Data pack of setup.

Setup Mode
Mode Data Pack Notes for Data Pack Function
Transmit data from register to variable SRAM 0x6F00-0x6FFF (low
0x00 No No
bytes).
Transmit data from variable SRAM (low bytes) to register and reset
0x01 No No
module parameters of R1-R3, R5-RA.
Coordinates of top-left Convert designated area to monochrome bitmap (vertical mode) and
Tran_Area
and bottom-right of area. save the data to designated VP address.
VP address for restoring A. Width should be even.
*VP
bitmap data. B. Height should be multiple of 8.
C. VP data format shown as below:
VP: status indicator, refreshed to 0x5555 after operation.
0x02
VP+1: horizontal length, by word.
VP+2: numbers of data segment.
VP+3: bitmap data, with MSB priority.
If the key code automatically upload is enabled (R2.3=1), module will
upload message (value in VP address upload to 0x5555) to serial port.
The command is mainly for printing of current screen.
*VP Variable pointer. Upload data in designated VP address to serial port.
0x03
Tx_LEN Length of data to be sent. Range of Tx_LEN: 0x0001-0xFFFF.
0x04 Save function with 0x03, uploading data to COM2 (reserved port).
Coordinates of top-left Convert designated area to monochrome bitmap (horizontal mode) and
Tran_Area
and bottom-right of area. save the data to designated VP address.
A. Width should be multiple of 16.
B. VP data format as shown below:
VP: status indicator, refreshed to 0x5555 after operation.
0x05 VP+1: horizontal length, by word.
VP address for restoring
*VP VP+2: numbers of data segment.
bitmap data.
VP+3: bitmap data, with MSB priority.
If the key code automatically upload is enabled (R2.3=1), module will
upload message (value in VP address upload to 0x5555) to serial port.
The command is mainly for printing of current screen.
Frame_He Send the current touched position to COM2 (serial port for reserving the
Frame header (2 bytes)
ad system), the format is:
0x06 Frame_Head + X + Y + Check (The cumulative Sum for 1 byte of X, Y)
Frame_En
Frame end (2 bytes) + Frame_end.
d

AMP DISPLAY INC. 23 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

5 Variable Config. File (14.BIN)


Variable Config. file, containing several variable commands, can be generated by DGUS_SDK. Since each
command occupies 32 bytes and each page contains 64 variable commands, space for each page is 2KB
(0x0800). Max page number is 1024 then max volume of variable Config. file is 2MB. Variables in the rear
have higher priority of display.

Variable command contains 6 sections.


Data
No. Definition Description
Length
1 0x5A 1 Fixed
2 Type 1 Variable type.
3 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
4 Len_Dsc 2 The whole process length (in terms of words).
Variable pointer, 0x0000-0x6FFF. Write 0x0000 for the variables that do not need
5 *VP 2 address assigning.
The command will be disabled when the high byte is 0xFF.
6 Description N Parameters of variable.

5.1 Variable Icon


5.1.1 Variable Icon (0x00)
Data
Address Definition Description
Length
0x00 0x5A00 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x0008 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 (x, y) 4 Display position, top-left coordinate of icon.
0x0C 0x03 V_Min 2 Floor of range, null if over range.
0x0E 0x04 V_Max 2 Ceiling of range, null if over range.
0x10 0x05 Icon_Min 2 Icon address in icon file corresponding to min value.
0x12 0x06 Icon_Max 2 Icon address in icon file corresponding to max value.
0x14 0x07:H Icon_Lib 1 Address of icon file.
Icon display mode.
0x15 0x07:L Mode 1 0x00: transparent.
Others: opaque.

AMP DISPLAY INC. 24 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.1.2 Animation Icon (0x01)
Data
Address Definition Description
Length
0x00 0x5A01 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000A 2 The whole process length (in terms of words).
Variable pointer of initial icon.
0x06 0x00 *VP 2 High word: unsigned integer.
Low word: reserved, status of animation. (0x0000-0x0FFFF)
0x08 0x01 (x, y) 4 Display position, top-left coordinate of icon.
0x0C 0x03 0x0000 2 0x0000 fixed.
0x0E 0x04 V_Stop 2 Value corresponding to stop animation.
0x10 0x05 V_Start 2 Value corresponding to start animation.
0x12 0x06 Icon_Stop 2 Icon at V_Stop value.
0x14 0x07 Icon_Start 2
Start/end icons for animation at V_Start value.
0x16 0x08 Icon_End 2
0x17 0x09:H Icon_Lib 1 Address of icon file.
Icon display mode.
0x18 0x09:L Mode 1 0x00: transparent.
Others: opaque.
If the value in VP address is equal to neither V_Stop nor V_Start, icons are not displayed on screen.

AMP DISPLAY INC. 25 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.1.3 Slider (0x02)
Data
Address Definition Description
Length
0x00 0x5A02 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x0009 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 V_begin 2 Variable corresponding to start point.
0x0A 0x02 V_end 2 Variable corresponding to end point.
Starting position of slider.
0x0C 0x03 X_begin 2 X coordinates for horizontal sliders.
(Y coordinates for vertical sliders.)
Ending position of slider.
0x0E 0x04 X_end 2 X coordinates for horizontal sliders.
(Y coordinates for vertical sliders.)
0x10 0x05 Icon_ID 2 Icon address in icon file.
Position of slider.
0x12 0x06 Y 2 Y coordinates for vertical sliders.
(X coordinates for horizontal sliders.)
0x14 0x07:H X_adj 1 X/Y axis offset to the left/top.
Slider mode.
0x15 0x07:L Mode 1
0x00: horizontal, others: vertical.
0x16 0x08:H Icon_Lib 1 Address of icon file.
Icon display mode.
0x17 0x08:L 1
Icon_mode 0x00: transparent, others: opaque.
0x00: integer (whole VP address).
0x18 0x09:H VP_DATA_Mode 1 0x01: high byte in VP address.
0x02: low byte in VP address.

AMP DISPLAY INC. 26 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.1.4 WordArt (0x03)
Data
Address Definition Description
Length
0x00 0x5A03 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x0007 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 X, Y 4 Top-left coordinate of words, left aligned.
0x0C 0x03 Icon0 2 Icon corresponding to number 0, by sequence of “01234567890-.”.
0x0E 0x04:H Icon_Lib 1 Address of icon file.
Icon display mode.
0x0F 0x04:L Icon_Mode 1
0x00: transparent, others: opaque.
0x10 0x05:H Int_Num 1 Length of integer digits.
0x11 0x05:L Dec_Num 1 Length of decimal digits.
0x12 0x06:H VP_Data_Mode 1 0x00: integer (2 bytes), 0x01: long integer (4 bytes).

AMP DISPLAY INC. 27 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.1.5 Image Animation (0x04)
Data
Address Definition Description
Length
0x00 0x5A04 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x0004 2 The whole process length (in terms of words).
0x06 0x00 0x0000 2 0x0000 fixed.
0x08 0x01 Pic_Begin 2 Starting picture of animation.
0x0A 0x02 Pic_End 2 Ending picture of animation.
0x0C 0x03:H Frame_Time 1 Switching speed of animation, by every 8ms.

Start image ID should be smaller than end image ID.


Set a <Image Animation> on end image to loop.
Send commands or set <Touch Control> button to interrupt animation.

AMP DISPLAY INC. 28 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.1.6 Icon Rotation (0x05)
Data
Address Definition Description
Length
0x00 0x5A05 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000C 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 Icon_ID 2 Icon address in icon file.
0x0A 0x02 Icon_Xc 2 Rotation center of icon: X coordinate.
0x0C 0x03 Icon_Yc 2 Rotation center of icon: Y coordinate.
0x0E 0x04 Xc 2 Rotation center on current screen: X coordinate.
0x10 0x05 Yc 2 Rotation center on current screen: Y coordinate.
0x12 0x06 V_Begin 2 Value corresponding to starting angle, null if over range.
0x14 0x07 V_End 2 Value corresponding to ending angle, null if over range.
0x16 0x08 AL_Begin 2 Starting angle, range from 0 to 720 (0x000 - 0x2D0), by every 0.5°.
0x18 0x09 AL_End 2 Ending angle, range from 0 to 720 (0x000 - 0x2D0), by every 0.5°.
VP mode.
0x0A: 0x00: integer (whole VP address).
0x1A VP_Mode 1
H 0x01: high byte in VP address.
0x02: low byte in VP address.
0x1B 0x0A:L Lib_ID 1 Address of icon file.
Icon display mode.
0x1C 0x0B Mode 1
0x00: transparent, others: opaque.
This function is mainly used for dash board. Rotation is always clockwise, AL_Begin should be larger than
AL_End, (or a 360 will be added to AL_End by system).

AMP DISPLAY INC. 29 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.1.7 Bit Variable Icon (0x06)
Data
Address Definition Description
Length
0x00 0x5A06 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000C 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer, by word.
Substitutive variable pointer, reserved 2 words. User software unable to
0x08 0x01 *VP_AUX 2
access.
0x0A 0x02 Act_Bit_Set 2 Display is on when bit value of VP is 1.
Bit Value
Display_Mode
0 1
0x00 ICON0S ICON1S

0x01 ICON0S Null.


Animation:
0x02 ICON0S
ICON1S-ICON1E.
0x0C 0x03:H Display_Mode 1 0x03 Null. ICON1S
Animation:
0x04 Null.
ICON1S-ICON1E.
Animation:
0x05 ICON1S
ICON0S-ICON0E.
Animation:
0x06 Null.
ICON0S-ICON0E.
Animation: Animation:
0x07
ICON0S-ICON0E. ICON1S-ICON1E.
Bit icons arranged mode.
0x00: X++, space unreserved for undesignated bits.
0x0D 0x03:L Move_Mode 1 0x01: Y++, space unreserved for undesignated bits.
0x02: X++, space reserved for undesignated bits.
0x03: Y++, space reserved for undesignated bits.
0X04: Icon display mode.
0x0E Icon_Mode 1
H 0x00: transparent, 0x01: opaque.
0x0F 0x04:L Icon_Lib 1 Address of icon file.
Icon ID for bit0 in non-animation mode, or starting icon ID for bit0 in
0x10 0x05 ICON0S 2
animation mode.
0x12 0x06 ICON0E 2 Ending icon ID for bit0 in animation mode.
Icon ID for bit1 in non-animation mode, or starting icon ID for bit1 in
0x14 0x07 ICON1S 2
animation mode.
0x16 0x08 ICON1E 2 Ending icon ID for bit1 in animation mode.
0x18 0x09 X, Y 4 Top-left coordinates of starting icons.
0x1C 0x0B DIS_MOV 2 Spacing between icons.
0x1E 0x00 fixed

AMP DISPLAY INC. 30 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.2 Text Variable
5.2.1 Data Variable (0x10)
Data
Address Definition Description
Length
0x00 0x5A10 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000D 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 X, Y 4 Top-left coordinate of text string.
0x0C 0x03 COLOR 2 Text color.
0x0E 0x04:H Lib_ID 1 Address of font file.
0x0F 0x04:L Font_X_Dots 1 Horizontal pixel numbers.
0x10 0x05:H ALI 1 0x00: right-aligned, 0x01: left-aligned, 0x02: centered.
0x11 0x05:L Int_Num 1 Length of integer digits.
0x12 0x06:H Dec_Num 1 Length of decimal digits.
VP mode.
0x00: integer (2 bytes).
0x13 0x06:L VP_Data_Mode 1 0x01: long integer (4 bytes).
0x02: high byte in VP address.
0x03: low byte in VP address.
Length of unit.
0x14 0x07:H Len_unit 1
0x00: without unit.
0x15 0x07:L String_Unit Max11 Unit data, by ASCII code.

AMP DISPLAY INC. 31 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.2.2 Text (0x11)
Data
Address Definition Description
Length
0x00 0x5A11 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000D 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 X, Y 4 Top-left coordinate of text string.
0x0C 0x03 Color 2 Text color.
0x0E 0x04 Xs Ys Xe Ye 8 Scope of text box, top-left and bottom-right coordinates.
Text length, by byte. Data will not display if it is changed into 0xFFFF or
0x16 0x08 Text_length 2
over range.
0x18 0x09:H Font0_ID 1 Address of font file for encoding mode 0x01 - 0x04.
Address of font file for encoding mode 0x00 and 0x05, also other
0x19 0x09:L Font1_ID 1
non-ASCII font for encoding mode 0x01 - 0x04.
0x1A 0x0A:H Font_X_Dots 1 Font size in X-direction. X should be Y/2 for encoding mode 0x01-0x04.
0x1B 0x0A:L Font_Y_Dots 1 Font size in Y-direction. Must be even.
Spacing between letters is defined by .7 bit.
.7 = 0: adapted spacing automatically.
0x1C 0x0B:H Encode_Mode 1 .7 = 1: fixed spacing.
Encoding mode is defined by .6 to .0 bit.
0: 8 bit coding, 1: GB2312, 2: GBK, 3:BIG5, 4: SJIS, 5: UNICODE.
0x1D 0x0B:L HOR_Dis 1 Character spacing.
0x1E 0x0C:H VER_Dis 1 Line spacing.
All ASCII characters from 4*8 pixels to 64*128 pixels are included in 0_DWIN_ASCII.hzk.

AMP DISPLAY INC. 32 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.2.3 RTC (0x12)
 Digital RTC
Data
Address Definition Description
Length
0x00 0x5A12 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000D 2 The whole process length (in terms of words).
0x06 0x00 0x0000 2 0x0000 fixed.
0x08 0x01 X, Y 4 Top-left coordinates of text.
0x0C 0x03 Color 2 Text color.
0x0E 0x04:H Lib_ID 1 Address of ASCII font file.
0x0F 0x04:L Font_X_Dots 1 Font size in X-direction.
Character string, by the RTC code table and ASCII code.
E.g.: current time is 2012-05-02 12:00:00 Wednesday,
0x10 0x05 String_Code MAX16
 Y-M-D H: Q: S 0x00, will be displayed as “2012-05-02 12:00:00”.
 M-D W H: Q 0x00, will be displayed as “05-02 WED 12:00”.
 RTC Code table
Description Encoding Format
Year Y 2000-2099
Month M 01-12
Day D 01-31
Hour H 00-23
Minute Q 00-59
Second S 00-59
Date W SUN MON TUE WED THU FRI SAT
Coding end 0x00
 Analog Clock
Data
Address Definition Description
Length
0x00 0x5A12 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000D 2 The whole process length (in terms of words).
0x06 0x00 0x0001 2 0x0001
0x08 0x01 X, Y 4 Rotation center of analog clock on current screen.
0x0C 0x03 Icon_Hour 2 Hour hand icon address in icon file, 0xFFFF: null.
0x0E 0x04 Icon_Hour_Central 4 Rotation center of hour hand icon.
0x12 0x06 Icon_Minute 2 Minute hand icon address in icon file, 0xFFFF:null.
0x14 0x07 Icon_Minute_Central 4 Rotation center of minute hand icon.
0x18 0x09 Icon_Second 2 Second hand icon address in icon file, 0xFFFF: null.
0x1A 0x0A Icon_Second_Central 4 Rotation center of second hand icon.
0x1E 0x0C:H ICON_Lib 1 Address of icon file.
0x1F No defintion 1 0x00.

AMP DISPLAY INC. 33 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.2.4 Timer Variable (0x13)
Data
Address Definition Description
Length
0x00 0x5A13 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000D 2 The whole process length (in terms of words).
Starting variable pointer of data string, data is encoded with BCD
0x06 0x00 *VP 2
format.
0x08 0x01 X, Y 4 Top-left coordinate of text.
0x0C 0x03 Color 2 Text color.
0x0E 0x04:H Byte_Num 1 Byte numbers to be displayed, 0x01 - 0x0F.
Address of font file. The format of font must be 8bit encoding,
0x0F 0x04:L Lib_ID 1
half-width, if Lib_ID is not 0x00.
0x10 0x05:H Font_X 1 Font size in X-direction.
Encoded separators string, used to define the format of Timer. Every
time a Timer data (BCD code) is read, one ASCII char will be added
0x11 0x05:L String_Code MAX15 after as separator.
Some special chars: 0x00: none, Timer data will be concatenated;
0x0D: new line.

AMP DISPLAY INC. 34 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.3 Graphic Variable
5.3.1 Dynamic Trend Curve (0x20)
Data
Address Definition Description
Length
0x00 0x5A20 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000A 2 The whole process length (in terms of words).
0x06 0x00 0x0000 2 0x0000
0x08 0x01 Xs Ys Xe Ye 8 Scope of trend curve window, null if over range.
0x10 0x05 Y_Central 2 Center line coordinates of trend curve in Y-direction.
0x12 0x06 VD_Central 2 Trend curve value at center line, normally average of max & min value.
0x14 0x07 Color 2 Trend curve color.
0x16 0x08 MUL_Y 2 Magnification in Y-direction, by every 1/256, 0x0000 - 0x7FFF.
0x18 0x09:H CHANEL 1 Chanel for trend curve, 0x00 – 0x07.
0x19 0x09:L Dis_HOR 1 Transverse spacing between sample point, 0x01 – 0xFF.
Use command 0x84 to send trend curve data, please refer to Chapter 2.2 Command Set for detailed
command format.

Scale and position of curve can be modified by buttons on screen if variable description is saved in SP
address.

 To scale the trend curve automatically with Incremental Adjustment (0xFE02), without user’s program.
 To move the trend curve up and down with using Slider adjustment (0xFE03) to revise the value of
Y_Central, without user’s program.

MUL_Y calculation of full-scale trend curve:


MUL_Y= (Ye-Ys)*256/ (Vmax-Vmin).
Ye Ys are Y coordinates of trend curve window, Vmax Vmin are Max and Min value of trend curve.

E.g.: a 12-bit A/D data acquisition, Vmax= 4095, Vmin= 0, to display trend curve fully-scale between Ys =
50 and Ye = 430, MUL_Y= (430-50)*256/ (4095-0)= 23.7, rounded down to get 23.

AMP DISPLAY INC. 35 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.3.2 Basic Graphic Display (0x21)
Data
Address Definition Description
Length
0x00 0x5A21 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x0005 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 0x01 Area 8 Graphic window area for commands 0x0001 – 0x0005, null if over range.
String Format
Address Definition Description
VP CMD Command.
Max number of data packs.
VP+1 Data_Pack_Num_Max
For command 0x0002, it’s number of beelines.
VP+2 DATA_Pack
Data Pack for Basic Graphic
Description of Data Format, by word
CMD Function Relative Data
Definition Description
Address Length
0x00 2 (x, y) Dot coordinates.
0x0001 Dot
0x02 1 Color Dot color.
0x00 1 Color Line color.
0x01 2 (x, y)0 Vertex 0 coordinates.
0x0002 Line
0x03 2 (x, y)1 Vertex 1 coordinates.
0x01+2*n 2 (x, y)n Vertex n coordinates.
0x00 2 (x, y)s Top-left coordinates.
0x0003 Rectangle 0x02 2 (x, y)e Bottom-right coordinates.
0x04 1 Color Rectangle’s color.
0x00 2 (x, y)s Top-left coordinates.
Rectangle
0x0004 0x02 2 (x, y)e Bottom-right coordinates.
Area Fill
0x04 1 Color Filled color.
0x00 2 (x, y) Circle center coordinates.
0x0005 Circle 0x02 1 Rad Radius of circle.
0x03 1 Color Circle color.
0x00 1 Pic_ID Image ID of cutting area.

Picture 0x01 2 (x, y)s Top-left coordinates of the cutting area.


0x0006
Cut/Paste 0x03 2 (x, y)e Bottom-right coordinates of the cutting area.
0x05 2 (x, y) Paste position on current screen.
0x00 2 (x, y) Top-left coordinates of icon.
0x**07 Icon Display Icon ID in icon file, high byte of command specifies address
0x02 1 ICON_ID
of icon file, display mode is transparent.
0x00 2 (x, y) Sampling dot coordinates.
0x0008 Area Fill
0x02 1 Color Filled color.
0x00 1 Color0
0x01 1 X0
0x0009 Vertical Line Connect (X0, Y0s), (X0, Y0e) with color0.
0x02 1 Y0s
0x03 1 Y0e
Judging condition:
0xFF: current drawing operation finished.
0xFE: the operation will be ignored.

AMP DISPLAY INC. 36 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
0x0001 Dot

0x0002 Line

0x0003 Rectangle

0x0004 Rectangle Area Fill

AMP DISPLAY INC. 37 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
0x0005 Circle

0x0006 Picture Cut/Paste

0x**07 Icon Display

AMP DISPLAY INC. 38 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
0x0008 Area Fill

0x0009 Vertical Line

AMP DISPLAY INC. 39 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.3.3 Table Display (0x22)
Data
Address Definition Description
Length
0x00 0x5A22 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x000C 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Starting VP address of data in table.
0x08 0x01:H TAB_X_Num 1 Column number, 0x01 - 0xFF.
0x09 0x01:L TAB_Y_Num 1 Row number, 0x01 - 0xFF.
0x0A 0x02:H TAB_X_Start 1 Starting column to be displayed, 0x00 - 0xFF.
0x0B 0x02:L TAB_Y_Start 1 Starting row to be displayed, 0x00 - 0xFF.
0x01 - 0x7F: data length for one cell.
0x00: data in VP address defines the length of each column.
0x0C 0x03:H Unit_Data_Num 1
When Unit_Data_Num is 0x00 the starting address of data will be (row
number/2, round up to integer) backward from VP address.
Spacing between letters is defined by .7 bit.
.7=0: the space is adapted automatically.
0x0D 0x03:L Encode_Mode 1 .7=1: fixed space.
Encoding mode is defined by .6 to .0 bit.
0: 8 bit coding, 1: GB2312, 2: GBK, 3:BIG5, 4: SJIS, 5: UNICODE.
0x0E 0x04 Xs Ys Xe Ye 8 Table area, top-left and bottom-right coordinates.
0x16 0x08 Color_line 2 Boarder color.
0x18 0x09 Color_text 2 Text color.
0x0A:
0x1A Font0_ID 1 Address of font for encoding mode 0x01 - 0x04.
H
0x1B 0x0A:L Font1_ID 1 Address of font for encoding mode 0x00 and 0x05.
0x0B:
0x1C Font_X_Dots 1 Font size in X-direction.
H
0x1D 0x0B:L Font_Y_Dots 1 Font size in Y-direction.
0x0C: Displaying or not the column header when TAB_X_Start is NOT 0.
0x1E TAB_X_Adj_Mod 1
H 0x00: valid display, 0x01: invalid display.
Displaying or not the row header when TAB_Y_Start is NOT 0.
0x1F 0x0C:L TAB_Y_Adj_Mod 1
0x00: valid display, 0x01: invalid display.
Set 0xFFFF as the end mark if length of data in some particular cells is shorter than predefined.
For oversized table, users can use slider to pull it.

AMP DISPLAY INC. 40 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0
5.3.4 Special Industrial Application (0x23)
Data
Address Definition Description
Length
0x00 0x5A23 2
0x02 *SP 2 Stack pointer, default setting is 0xFFFF (set by Config. file).
0x04 0x0001 2 The whole process length (in terms of words).
0x06 0x00 *VP 2 Variable pointer.
0x08 24 0x00 fixed.

String format.
Address Definition Description
VP CMD Command.
VP+1 Data_Pack_Num_Max Data Pack Number.
VP+2 DATA_Pack

Data pack for Special Industrial Application


Description of data pack format, by word
CMD Function
Relative
Length Definition Description
Address
0x00 1 Color0 Color of “Safe Zone”.
Color of normally overlapped area (Overlapped
0x01 1 Color1
once).
Color of High-Risk overlapped area (Overlapped
0x02 1 Color2
twice or more).
0x03 1 Color3 Color of circles.
Overlapped
Area of
0x0001 0x04 1 Color4 Color of evasion.
Multiple
Circles Fill
0x05 4 Disp_Area Display area, null if over range.

0x09+4*n 2 (x, y)n Center coordinates of No. n.

0x0B+4*n 1 RADn_1 The bigger radius of No. n concentric circles.

0x0C+4*n 1 RAD2n_2 The smaller radius of No. n concentric circles.

AMP DISPLAY INC. 41 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

6 Development Steps
Step 1: Planning of Variables
Basic principles of planning:
VP should be arranged in continuous addresses for convenience to write and read.
Overlap of VP and SP addresses should be avoided.

Step 2: Interface Design


Pictures, icons and fonts are generated by image processing software.
Color palette should be 65K color (16-bit) to ensure the accordance of design and final effect.

Step 3: Configuration of User Interface


Config. file for the touch logic and variable display are generated by DGUS_SDK.

AMP DISPLAY INC. 42 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

Step 4: Debugging & Modification


Testing and revising the interface by viewing effects on DGUS module.

Step5: Confirm & Filing


Config. files, fonts, icon files, pictures and other files can be stored in SD cards for filing and mass
production.

AMP DISPLAY INC. 43 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

AMP DISPLAY INC. 44 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

Appendix: DGUS Main Functions

①Variable input and display: 0xFE00 Variable Data Input (popup keypad which is not on the current
page), 0x5A10 Variable Data Display.
② Variable adjustment (“++”, “--”) and display: 0xFE02 Adjustment of Variable data, 0x5A10 Variable
Data Display.
③Variable adjustment (drag with following slider): 0xFE03 Slider Adjustment, 0x5A02 Slider Scale
Indicator.
④ Time set and display: 0xFE04 RTC Set (similar to 0xFE00 Variable Data Input), 0x5A12 RTC Display
(Two mode of time display: digital and analog).
⑤ Scale bar, status bar: 0x5A00 Variable Icon Display (Display different icons corresponding to the
different variable values), 0x5A01 Animation Icon Display (When the variable is a specified value, display
multiple icons circulation animation in proper order).
⑥Dashboard: 0x5A05 Icon Rotation Instructions.
⑦Text input and display: 0xFE06 Text In-put, 0x5A11 Text display.

⑧Boot animation, electronic album: 0x5A04 Image Animation.


⑨Table display, drag and print: 0x5A22 Table Display, 0xFE03 Slider Adjustment, 0x5A02 Slider Scale
Indicator, 0xFE07 Firmware parameter Configuration.

AMP DISPLAY INC. 45 www.ampdisplay.com/


Professional, Creditable, Successful DGUS Development Guide V3.1.0

⑩ Display and adjust the trend curve: 0x5A20 Trend curve Display (Support up to eight channels
simultaneously receive data and show the real-time trend curve), 0xFE03 Slider Adjustment, 0x5A02 Slider
scale indicator, 0xFE02 Incremental Adjustment. Adjustment of the trend curve scaling and central axis
position can be achieved without code interference.

AMP DISPLAY INC. 46 www.ampdisplay.com/

You might also like