Jason ZHANG EN DGUS V5.10 User Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 59

DownloadJason ZHANG EN DGUS V5.10 User Guide
Open PDF In BrowserView PDF
Professional, Creditable, Successful

DGUS_SDK User Guide_V5.1

Beijing DWIN Technology Co., Ltd.

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Contents
1. DGUS_SDK Instruction........................................................................................................................................................ 4
1.1 Operation of DGUS_SDK.......................................................................................................................................... 4
1.2 Main Interface of DGUS_SDK_V5.1........................................................................................................................5
2. Basic Steps for DGUS_SDK Operation.............................................................................................................................7
2.1 Create a new project.................................................................................................................................................. 7
2.1.1 Start a new project...........................................................................................................................................7
2.1.2 Select corresponding resolution and save the path.................................................................................. 8
2.1.3 Add images....................................................................................................................................................... 8
2.1.4 Create a CONFIG.TXT file for setting system parameters.......................................................................9
2.2 Configure touch functions........................................................................................................................................ 11
2.3 Configure variable display....................................................................................................................................... 12
2.4 Create configuration files.........................................................................................................................................13
2.5 Download....................................................................................................................................................................14
3. Main Functions of DGUS_SDK.........................................................................................................................................15
3.1 Touch Config..............................................................................................................................................................16
3.1.1 Popup Window...............................................................................................................................................16
3.1.2 Variable Data Input....................................................................................................................................... 17
3.1.3 Incremental Adjustment................................................................................................................................18
3.1.4 Slider Adjustment...........................................................................................................................................19
3.1.5 RTC..................................................................................................................................................................20
3.1.6 Basic Touch Control...................................................................................................................................... 21
3.1.7 Return Key Code........................................................................................................................................... 22
3.1.8 ASCII Input......................................................................................................................................................23
3.1.9 Firmware Parameter Settings......................................................................................................................24
3.1.10 Status sync-returned...................................................................................................................................26
3.2 Variable Config..........................................................................................................................................................28
3.2.1 Variable Icon...................................................................................................................................................28
3.2.2 Animation Icon................................................................................................................................................29
3.2.3 Slider................................................................................................................................................................30
3.2.4 WordArt........................................................................................................................................................... 31
3.2.5 Image Animation............................................................................................................................................ 32
3.2.6 Icon Rotation.................................................................................................................................................. 33
3.2.7 Data Variable..................................................................................................................................................34
3.2.8 Text Display.................................................................................................................................................... 35
3.2.9 Digital RTC Display....................................................................................................................................... 36
3.2.10 Analog Clock Display..................................................................................................................................37
3.2.11 Dynamic Trend Curve................................................................................................................................. 38
3.2.12 Table Display................................................................................................................................................39
3.2.13 Basic Graphic Display................................................................................................................................ 40
3.2.14 Special Industrial Application.................................................................................................................... 42
3.2.15 Bit Variable Icon...........................................................................................................................................43
3.2.16 Timer Variable..............................................................................................................................................45
3.2.17 RollText......................................................................................................................................................... 46
4. Commands........................................................................................................................................................................... 47
4.1 Data Frame................................................................................................................................................................ 47
Beijing DWIN Technology Co., Ltd.

2

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

4.2 Command Set............................................................................................................................................................47
4.3 Register...................................................................................................................................................................... 47
4.4 VP & SP......................................................................................................................................................................49
4.4.1 VP (Variable Pointer).................................................................................................................................... 49
4.4.2 SP (Stack Pointer).........................................................................................................................................51
4.5 Examples....................................................................................................................................................................53
4.5.1 Access Register of DGUS............................................................................................................................54
4.5.1.1 Write Data into Register..................................................................................................................54
4.5.1.2 Read Data from Register................................................................................................................ 54
4.5.1.3 Response from the DGUS module............................................................................................... 54
4.5.2 Access Variable SRAM.................................................................................................................................55
4.5.2.1 Write Data into variable SRAM...................................................................................................... 55
4.5.2.2 Read Data from variable SRAM.................................................................................................... 55
4.5.2.3 Response from the DGUS module............................................................................................... 55
4.5.3 Dynamic Trend Curve Display.....................................................................................................................55
4.5.4 Basic Graphic Display...................................................................................................................................56

Beijing DWIN Technology Co., Ltd.

3

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

1. DGUS_SDK Instruction
1.1 Operation of DGUS_SDK
(1) DGUS (DWIN Graphical Utility Software) is an intelligent GUI design software for DWIN DGUS LCM with K600+ kernel. As
be helpful to interface of display design faster than ever, diversified display effects can be achieved easily and rapidly with much less
programming. The variables in use are defined by software DGUS_SDK v5.1 that is accessed by controller via address. All
parameters and images can be downloaded via SD card which stores related .bin files to make your design into real application.
(2) Install DGUS_SDK_V5.1:
Unzip DGUS_SDK_V5.1.zip, and click DGUS ToolV5.1.exe to run it.
(.net Framework 2.0 is required to run the software).

(3) Variable Definition


VP (Variable Pointer): The addresses of variables in variable SRAM (56KB). Users can set buttons with defined VP,

to change the value in this address and display contents corresponding with the value in VP address.



SP (Stack Pointer): the address of definitions, starting address of description data of variables. Change the value in

particular address to modify variable properties. Take  function as example.
Data
Add.
Definition
Description
Length
0x00
0x5A03
2
0x02

*SP

2

Stack pointer, default setting is 0xFFFF.

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 text, left aligned.

0x0C

0x03

Icon0

2

Icon ID corresponding to 0, the sequence is “0123456789-.”.

0x0E

0x04:H

Icon_Lib

1

Address of icon file.

0x0F

0x04:L

Icon_Mode

1

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).

ICON display mode.
0x00: transparent, others: opaque.

E.g.: If SP valued as 0x5000 for WordArt variable, VP parameter will be saved in the ADDRESS of 0x5000. Variable position
parameters will be saved in 0x5001-0x5002
(4) If you need to handle with icons, please drop icon files into Icon Generator to make icon file running in DGUS correctly.
(5) How to select area for buttons & variables.
A. Input coordinates directly.

or
B. Drag the button/variable with mouse.

(6) Define SP address for variables.

Beijing DWIN Technology Co., Ltd.

4

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

SP defines the description of variable settings; to reduce overlap of SP address is necessary. There is overlap judging
embedded, Configuration files won’t be created with failure message when it comes an overlap of SP address.

(7) Import existing DGUS config. files into new project.
A. Create a new project.
B. Add pictures.
C. Import config files.
D. Copy icon files into  folder.

Note: Frame header is self-defined by users. In this document, A5 5A is taken as frame header for instance.

1.2 Main Interface of DGUS_SDK_V5.1

a)

Click  to activate the window below:

b)

Select resolution and path for your project.

Beijing DWIN Technology Co., Ltd.

5

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Screen Property Set.
E.g. for:
DMT80480T070_06WT.
Color T: 16bit.
Resolution 80480: 800x480.

Navigation Bar:
New

Create a new project.

Open

Open an existing project (.hmi file).

Save

Save the current project.

Save As

Save the current project in a new folder.

Close

Close the current project.

Variables Preview

Preview buttons & variables

Resolution

Modify resolution of project.

Generating

Modify system configuration and save the settings in config.txt. Refer to illustration

Configuration file

below.

Import Config.

Import existing config. files to the current project.

Export Variables

Generate  and  for quick view of buttons &
variables.

System Properties

Modify system properties and save the settings in config.txt. Refer to illustration
below

DGUS Configuration File

Download <13Touch_Control_Config.bin>, <14Variable_Config.bin>, and the image;

Download

debug commands via serial port.

Help

Help documents.

Align Left

Align the selected buttons and variables to left.

Align right

Align the selected buttons and variables to right.

Align Top

Align the selected buttons and variables to top.

Align bottom

Align the selected buttons and variables to bottom.

Auto Width

Adjust the selected buttons & variables at same width.

Auto Height

Adjust the selected buttons & variables at same height.

Vertical centered

Adjust the selected buttons & variables at the vertical center.

Horizontal centered

Adjust the selected buttons & variables at the horizontal center.

Copy

(Ctrl + C): copy

Paste

(Ctrl + V): paste

Delete

(delete): delete

Front

Place the button or variable at front layer.

Back

Place the button or variable at backward layer.

SP Address Setting

Set SP for variables.

Variables Preview

Preview buttons & variables

Show Text

show the names of buttons & variables or not.

Reference:Inputted data will be sent via serial port only when both  in System Config. Window and  settings in buttons properties are ticked.

Beijing DWIN Technology Co., Ltd.

6

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Tool Bar:
Switching between "Touch Config" & "Variable Config" & Edit Tools using Navigation bar, or shortcut key F2, F3,F4.

2. Basic Steps for DGUS_SDK Operation
2.1 Create a new project
2.1.1 Start a new project
Open the DGUS_SDK_V5.1--------> Click “New Project” button to start a new project.

Beijing DWIN Technology Co., Ltd.

7

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

2.1.2 Select corresponding resolution and save the path

2.1.3 Add images

Images indicating here are what to be displayed as background with “.bmp” format required.
Image naming rules: ID + Name. bmp (name as optional)
For example, “0_Data Input.bmp” or “0.bmp”

Beijing DWIN Technology Co., Ltd.

8

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

2.1.4 Create a CONFIG.TXT file for setting system parameters
Step into setting such system as baud rate, backlight, as well as cycle time etc.

Export Configuration File – “CONFIG. txt”

Beijing DWIN Technology Co., Ltd.

9

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

For the value and functions of each parameters, please refer to the chapter 1.2 of the DGUS Dev. Guide_V5.1—CONFIG. TXT

Beijing DWIN Technology Co., Ltd.

10

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

If the frame header is set as R3=5A RA=A5, please use the software “Serial debugging assistant sscom32 " sending command
below for verifying all images works fine.
5A A5 04 80 03 00 01( 00 01 signify images switching to No1.)
Later, check if images No1 switched successfully. (format must be .bmp naming started from”00”).
There are config.txt failed or com port out of work in the event of images switch failure. Please affirm parameter for config.txt
again including frame header, baud rate etc.

2.2 Configure touch functions
Select the “Touch Config” from pull-down menu-------> Add touch function, as “Data Input” -------> Drag a square on your button
as follow yellow area -------> Set the properties, such as button effect, key value, etc.

Beijing DWIN Technology Co., Ltd.

11

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

2.3 Configure variable display
Select the “Variable Config” from pull-down menu -------> add the display function, as “Data Variable” ------->Drag a blue square
on area, the variable will be displayed based on the upper-right coordinates.--------> Set the properties of variable as font color, font
ID.

Beijing DWIN Technology Co., Ltd.

12

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

2.4 Create configuration files
Click the “Generating Configuration File” button, it will create a touch control configuration file and a variable configuration file.
Their default file names are “13Touch_Control_Config.bin” and” 14Variable_Config.bin “which cannot be renamed, or the project
can’t be opened properly.
Please note that 13&14 bin file must be dropped in corresponding DWIN_SET folder if file downloaded via UART, otherwise
pop-up red warning will show up warning correct file are not found.

Beijing DWIN Technology Co., Ltd.

13

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

2.5 Download
When you completed above steps, it will create a DWIN_SET folder and a project named DWprj.hmi in the path you selected
before.

The DWIN_SET folder includes as follow:

Beijing DWIN Technology Co., Ltd.

14

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Copy the DWIN_SET folder into the SD card root directory ------> Powered on DGUS LCM------> Insert SD card into the slot of
LCM, the configuration files will be downloaded automatically.
Note: During downloading, don’t turn off the LCM, the screen will blink to blue then back to the first image after completion

3. Main Functions of DGUS_SDK
Touch Config : users can use DGUS_SDK software to add buttons on screen, including Popup Window, Variable Data
Input, Incremental Adjustment, Slider Adjustment, RTC Setting, Touch Control, Return Key Code, and ASCII Input. Buttons are
shown as yellow rectangles in DGUS_SDK_V51. Users can also add press effect for buttons.

Variable Config : users can use DGUS_SDK to add variables on screen, including Variable Icon, Animation Icon, Slider,
WordArt, Image Animation, Icon Rotation, Data Variable, Text Display, RTC Display, Analog Clock Display, Dynamic Trend Curve
Display, Table Display, and Basic Graphic Display, Bit Icon, Timer Variable. Variables are shown as light-blue rectangles in
DGUS_SDK_V51.

Parameter settings: users can use  to adjust parameter settings of DGUS module. Parameter with
“0x” in front should be filled with hex numbers.

Beijing DWIN Technology Co., Ltd.

15

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.1 Touch Config.
3.1.1 Popup Window
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls (Excel) file.
Data Auto Upload: after pressing the button, key code auto sent to
serial port.

Button Effect: set picture ID for touching effect, -1: null.
VP: variable pointer.
VAR Type:
INT: write key code in VP address (word).
High Byte: write low byte of key code in high byte of VP.
Low Byte: write low byte of key code in low byte of VP.
Bit: write data from last bit of key code into designated bit of VP address.
(0x10 corresponds to VP.0, 0x1F corresponds to VP.F).

Popup Window: set window picture ID and window area.
Image ID: image ID of window picture.
Cut Area: cut area in image ID.
Paste Position: position of window on current screen.
Note: Only  buttons will work on popup window.

Illustration of button :

Click  button - Window pops up - Select YES/NO.

Beijing DWIN Technology Co., Ltd.

16

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.1.2 Variable Data Input
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to serial
port.

Button Effect: set picture ID for touching effect, -1: null.
Jump To: switch to a new picture after pressing.
VP: variable pointer.
VAR Type:
INT: integer.
LONGINT: long integer.
High byte: high byte in VP address.
Low byte: low byte in VP address.

Number of INT Bit: length of integer digits.
Number of DEC Bit: length of decimal digits.
Position: data position when typing.
Font Color: data color when typing.
Font ID: address of ASCII font file.
Font Size: horizontal pixel numbers.
Cursor Color: white/black cursor.
Display Mode: masked by (*)/direct display.
Define Keyboard:
Set the keyboard picture ID and the keyboard area.

Image ID: image ID of the keyboard area.
Cut Area: cut area in image ID.
Paste Position: position of the keyboard on current screen.
Enable VAR Input Limitation:
Set limits for inputting numbers.

Notes: Only  buttons will work on keyboard: 0x00F1 (Confirm), 0-9 corresponds to 0x0030 - 0x0039, 0x00F0
(Cancel), 0x00F2 (Backspace), 0x002D (+/-), 0x002E (.).
Ignore decimal point while setting range restriction for return value. E.g.: the setting is 3 integer bits and 2 decimal bits, and then
the top limit is 10000, rather than 100.
Inputted data can be displayed by ,  etc.

Beijing DWIN Technology Co., Ltd.

17

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Illustration of button :

Click text – Keyboard pops up – Type data – OK.
Click  to interrupt input.

3.1.3 Incremental Adjustment
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to
serial port.

Button Effect: set picture ID for touching effect, -1: null.
VP: variable pointer.
VAR Type:
0x00: integer.
0x01: high byte in VP address.
0x02: low byte in VP address.
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.

Adjustment Method: ++/--.
Over-limit Operation: stop/ cycle.
Step Size: set step size for +/- buttons.
Min. Value: minimum value for adjustment.
Max. Value: maximum value for adjustment.
Adjusted data can be displayed by ,  and
 etc.

Beijing DWIN Technology Co., Ltd.

18

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Illustration of button :

Click <+> or <-> to adjust corresponding value.
Hold the button to adjust continually.

3.1.4 Slider Adjustment
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to serial
port.

VP: variable pointer.
Value Return Type:
0x00: integer.
0x01: high byte in VP address.
0x02: low byte in VP address.

Direction: horizontal/vertical.
Start Return Value:
The value corresponding to left/top side of slider.

Terminated Value:
The value corresponding to right/bottom side of slider.
This function is only for making touching area for slider. To display it, please
use  function.
Adjusted data can be displayed by ,  etc.

Beijing DWIN Technology Co., Ltd.

19

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Illustration of button :

Hold the button over 0.5 second and slide the slider to modify number in the right, the value will also be changed.

3.1.5 RTC
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to serial
port.

Button Effect: set picture ID for touching effect, -1: null.
Display Position: data position when typing.
Font Color: data color when typing.
Font Lib_ID: address of ASCII font file.
Font Size: horizontal pixel numbers.
Cursor Color: white/black cursor.
Keyboard setting:
Set the keyboard picture ID and the keyboard area.

Image ID: image ID of keyboard area.
Cut Area: cut area in image ID.
Paste Position: position of the keyboard on current screen.
Notes: A keyboard setting is the same as .
Use  or  to display current time.

Beijing DWIN Technology Co., Ltd.

20

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Illustration of button :

Click  button - Keyboard Pops Up - Clock Sets Up the Current Time.

3.1.6 Basic Touch Control
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Button Effect: set picture ID for touching effect, -1: null.
Jump To: switch to a new picture after pressing.
KeyValue:
Only  button works on keyboard area.
Valid key code range: 0x0030 - 0x0039 (0-9), 0x002E (.),
0x002D (+/-), 0x00F0 (Cancel), 0x00F1 (Confirm),
0x00F2 (Backspace).

Beijing DWIN Technology Co., Ltd.

21

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.1.7 Return Key Code
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to serial
port.

Button Effect: set picture ID for touching effect, -1: null.
Jump To: switch to a new picture after pressing.
KeyValue: self-defined keyValue for buttons.
VP: variable pointer.
VP Type:
Save in VP address.
Save in high byte of VP address.
Save in low byte of VP address.
Save in specified bit of VP address.

Illustration of button :

Set a  button, of which VP is 0x000A, key value is 0x0005.

Beijing DWIN Technology Co., Ltd.

22

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

DGUS module auto uploads data 0005 to serial port as shown.

3.1.8 ASCII Input
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to serial
port.

Button Effect: set picture ID for touching effect, -1: null.
Jump To: switch to a new picture after pressing.
VP: variable pointer.
Text Length: length of text, by word, range from 1 to 123.
Input Mode: re-input/ edit text.
Font Lib_ID: address of ASCII font file.
Font Width: horizontal pixel numbers.
Font Height: vertical pixel numbers.
Cursor Color: white/black.
Font Color: data color when typing.
Upload value as typing: tying status upload.
Text Display Area: data position on screen when typing.
Keyboard Displayed in: Current Page/Other Page.
Keyboard Setting:
Set the keyboard picture ID and the keyboard area.

Image ID: image ID of the keyboard area.
Cut Area: cut area in image ID.
Paste Position: position of the keyboard on current screen.
Note: Create  buttons on keyboard to define the
key code of the button (0x4161 indicates “A”).
Inputted data can be displayed with  function.

Beijing DWIN Technology Co., Ltd.

23

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Illustration of button :

3.1.9 Firmware Parameter Settings
Selected Area: selected button area.
Preview: preview button effect.
Name: name this button for viewing it in .xls file.
Data Auto Upload: after pressing the button, key code auto sent to
serial port.

Button Effect: set picture ID for touching effect, -1: null.
Jump To: switch to a new picture after pressing.
Mode: setup mode.
DataPack: data pack of setup.
Setup Mode

Beijing DWIN Technology Co., Ltd.

24

www.dwin.com.cn

Professional, Creditable, Successful
Mod
e

Data Pack

0x00

No

0x01

0x02

0x03
0x04

0x05

0x06

Description

DGUS_SDK User Guide V5.1

Function

Transmit data from register to variable SRAM in 0x6F00 to 0x6FFF (low
bytes).
Transmit data from address 0x6F00 to 0x6FFF in variable SRAM (low
No
No
bytes) to register and reset module parameters including R1-R3,
R5-RA.
Coordinates of top-left
Convert designated area to monochrome bitmap (vertical mode)
Tran_Area
and bottom-right of area. and save the data to designated VP address.
A.
Width (Xe-Xs+1) should be even.
VP address for restoring
*VP
B.
Height (Ye-Ys+1) should be multiple of 8.
bitmap data.
C.
VP data format shown as below:
VP: status indicator, refreshed to 0x5555 after operation.
VP+1: horizontal length, by word. (Xe-Xs+1) &0xFFFE/2
VP+2: numbers of data segment. (Ye-Ys+1) &0xFFF8/8
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.
Range of Tx_LEN: 0x0001-0xFFFF.
Tx_LEN
Length of data to be sent.
Same function with 0x03, uploading data to COM2 (reserved port).
Coordinates of top-left
Convert designated area to monochrome bitmap (horizontal mode)
Tran_Area
and bottom-right of area. and save the data to designated VP address.
A.
Width (Xe-Xs+1) should be multiple of 16.
B.
VP data format as shown below:
VP: status indicator, refreshed to 0x5555 after operation.
VP+1: horizontal length, by word. (Xe-Xs+1) &0xFFF0/16
VP+2: numbers of data segment. (Ye-Ys+1)
VP address for restoring
*VP
VP+3: bitmap data, with MSB priority.
bitmap data.
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_Head Frame header (2byte)
Send the current touched position to COM2 (serial port for
reserving the system), the format is:
Frame_Head + X + Y + Check (The cumulative Sum for 1 byte of X,
Frame_End
Frame end (2byte)
Y) + Frame_end.
No

Beijing DWIN Technology Co., Ltd.

25

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.1.10 Status sync-returned
Selected Area: (X, Y) are the top-left coordinates of icons.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
TP_ON_Mode: commands returned with once touch.
TP_ON_CONTINUE_Mode: commands returned with freezing
touch.

TP_OFF_Mode: commands returned with touch released.
Status sync-returned mode

Add.

Definition

Data Length

description

0X00

Pic_ID

2

Picture ID

0X02

TP_Area

8

The selected button area

0X0A

Pic_Next

2

0X0C

Pic_On

2

Picture ID for touching effect,0XFF:null.

0X0E

TP_Code

2

0XFE08

0X10

0xFE

2

0XFE

Switch

to

a

new

picture

after

pressing,0XFF:null.

Commands returned with one touch:
0X00=no commands returned;
0X01=read LEN1 length data from
0X11

TP_ON_Mode

VP1S , and write to VP1T variable adds;

1

0X02=read LEN1 length data from
VP1S, and write to the serial port;
0X03=read LEN1 length data from
VP1S, and write to VP1T register.

0X12

VP1S

Beijing DWIN Technology Co., Ltd.

Reading data adds of the first touch on the

2

touch screen.

26

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

0X14

VP1T

2

0X16

0x00

1

Writing adds of the first touch on the touch
screen.
0X00
Length of the returning data(byte).

0X17

LEN1

1

0X01=LEN1

must

be

an

even

number.
0X18

0xFE

1

0XFE
Commands returned with a freezing
touch:
0X00=no commands returned;
0X01=read LEN2 length data from

0X19

TP_ON_Continue_Mode

1

VP2S , and write to VP2T variable adds;
0X02=read LEN2 length data from
VP2S , and write to the serial port;
0X03=read LEN2 length data from
VP2S, and write to VP2T register.

0X1A

VP2S

2

0X1C

VP2T

2

0X1E

0x00

1

Reading data adds of the freezing touch
on the touch screen.
writing data adds of the freezing touch on
the touch screen.
0X00
Length of the returning data(byte).

0X1F

LEN2

1

0X01=LEN2

must

be

an

even

number.
0X20

0xFE

1

0XFE
Commands returned with the button
is released:
0X00=no commands returned;
0X01=read LEN3 length data from

0X21

TP_OFF_Mode

1

VP3S , and write to VP3T variable adds;
0X02=read LEN3 length data from
VP3S , and write to the serial port;
0X03=read LEN3 length data from
VP2S, and write to VP3T register.

0X22

VP3S

2

0X24

VP3T

2

0X26

0x00

1

Reading data adds when a button is
released.
writing data adds of the freezing touch on
the touch screen.
0X00
Length of the returning data(byte).

0X27

LEN3

1

0X01=LEN3

must

be

an

even

number.
0X28

0x00

Beijing DWIN Technology Co., Ltd.

8

Reserved,0x00 as d.

27

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2 Variable Config.
3.2.1 Variable Icon
Selected Area: (X, Y) are the top-left coordinates of icons.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
Set SP to load description data into variable SRAM.
0xFFFF: load description data from configuration file.

VP: variable pointer.
ICON File: address of icon file.
Min/Max value: limits of variables, null if over limit.
Icon ID:
Icon address in icon file corresponding to the min/max value.

Display Mode: transparent/background.
Initial Value: Set the initial value & save it in the 22 config file,the system will
be initiated according to 22 config file when the DGUS is started.

Illustration of variable :

Change the value in VP address to display different icons.

Beijing DWIN Technology Co., Ltd.

28

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.2 Animation Icon
Selected Area: (X, Y) are the top-left coordinates of icons.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
V_Stop: set value to stop animation.
V_Start: set value to start animation.
ICON File: address of icon file.
ICON Stop: icon at V_stop value.
Icon_Start/Icon_End:
Start/end icon for animation at V_start Value.

ICON Display Mode: transparent/background.
Initial Value: Set the initial value & save it in the 22 config file,the system
will be initiated according to 22 config file when the DGUS is started.

Illustration of variable :
When value in VP address is 0, screen display icon 0:

When value in VP address is 9, animation starts.

......

Beijing DWIN Technology Co., Ltd.

......

29

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.3 Slider
Selected Area: (X, Y) are the top-left coordinates of icons.
X, W is start/end point of horizontal slider.
Y, H is start/end point of vertical slider.

Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
Start/End Value: value corresponding to start/end point.
Slider Mode: horizontal/vertical.
ICON File: address of icon file.
ICON ID: icon address in icon file.
Display Mode: transparent/background.
Coordinate Offset:
Offset to the left/top.

VAR Type:
Integer (whole VP address).
High byte in VP address.
Low byte in VP address.

Initial Value: Set the initial value & save it in the 22 config file,the system will
be initiated according to 22 config file when the DGUS is started.

Note: Set same VP address for  button and  variable to combine them.
 is also used as progress bar.

Send command to serial port:
Frame header, Length, Command, VP, Data string to display the Slider and Data above.
A5 5A

05

82

000C

Beijing DWIN Technology Co., Ltd.

002C

30

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.4 WordArt
Selected Area: (X, Y) are the top-left coordinates of icons.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
ICON File: address of icon file.
ICON 0: icon address corresponding to number 0.
ICON Display Mode: transparent/background.
VAR Type: integer/long integer.
Number of INT/DEC bit: length of integer/decimal digits.
Initial Value: Set the initial value & save it in the 22 config file,the system
will be initiated according to 22 config file when the DGUS is started.

Illustration of variable :

Send command to serial port:

Frame header, Length, Command, VP, Data string to display the WordArt above.
A5 5A

05

82

Beijing DWIN Technology Co., Ltd.

0CCC

0017

31

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.5 Image Animation
Selected Area: (X, Y) are the top-left coordinates of icons.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
Start Image ID: select starting picture of animation.
End Image ID: select ending picture of animation.
Image Switching Time:
Select switching speed for animation, by every 8ms.

Start image ID should be less than end image ID.
Set a  on end image to loop.
Send commands or set  button to interrupt animation.

Beijing DWIN Technology Co., Ltd.

32

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.6 Icon Rotation
Selected Area: (X, Y) are the coordinates of rotating center.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
ICON File: address of icon file.
ICON ID: icon address in icon file.
ICON Rotation Center:
Select rotation center (X, Y) for the icon.

Initial/End VAR Value:
Value corresponding to start/end angle, null if over limit.

Initial/End Rotation Angle:
Select start/end angle, ranging from 0 to 720, by every 0.5°.

Display Mode: transparent/background.
VP_Mode:
Integer (whole VP address).
High byte in VP address.
Low byte in VP address.

Initial Value: Set the initial value & save it in the 22 config file,the system
will be initiated according to 22 config file when the DGUS is started.

Send serial commands or press buttons to change value in VP
address, and then to adjust the angle of pointer.

Illustration of variable :
Icons file for rotation:

Send command to serial port:

Frame header, Length, Command, VP, Data string to display the ICON above.
A5 5A

05

82

Beijing DWIN Technology Co., Ltd.

000A

0084

33

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.7 Data Variable
Selected Area: (X, Y) are the top-left coordinates of data.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
Font Color: data color.
Font Lib_ID: address of ASCII font file.
Font Size: horizontal pixel numbers.
Alignment Mode: Right/Left /Centered.
VAR Type:
0x00: integer.
0x01: long integer.
0x02: high byte in VP address.
0x03: low byte in VP address.

Number of INT Bit: length of integer digits.
Number of DEC Bit: length of decimal digits.
Unit Length:
Corresponding to displayed unit automatically.

Unit Displayed:
ASCII unit for data, max length is 11 bytes.

Initial Value: Set the initial value & save it in the 22 config file,the system
will be initiated according to 22 config file when the DGUS is started.

Send commands or set buttons to modify displayed data.

Illustration of variable :

Send command to serial port:

Frame header, Length, Command, VP, Data string to display the Data (left-up) above.
A5 5A

05

82

Beijing DWIN Technology Co., Ltd.

0000

0022

34

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.8 Text Display
Selected Area: (X, Y) are top-left coordinates of data.
Textbox is the selected area.

Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
Text Color: data color.
Encoding Mode:
0x00: 8bit encoding, 0x01: GB2312, 0x02: GBK, 0x03:BIG5, 0x05: UNICODE.

Set Character Interval MANUALLY: on/off.
Text Length: select text length, by byte.
Font0_ID: address of ASCII font file.
Font1_ID: address of non-ASCII font file.
Dot Matrix in X/Y-direction: select font size. Please note that parameter
should be the same with the size of font file.

Horizontal/Vertical Separation:
Pixel distance in Horizontal/Vertical.

Initial Value: Set the initial value & save it in the 22 config file,the system will
be initiated according to 22 config file when the DGUS is started.

Illustration of variable :

Send command to serial port:

Frame header, Length, Command, VP, Data string to display the Text (bottom-left) above.
A5 5A

0D

82

Beijing DWIN Technology Co., Ltd.

0008

64 77 69 6E 20 64 67 75 73 76

35

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.9 Digital RTC Display
Selected Area: (X, Y) are the top-left coordinates of data.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
Font Color: data color.
Font Lib_ID: address of ASCII font file.
Font Size: horizontal pixel numbers.
Date Format: refer to the red texts in picture in the left.
Use  button to modify current time.

llustration of variable  (Digital clock on bottom-right of screen):

Beijing DWIN Technology Co., Ltd.

36

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.10 Analog Clock Display
Selected Area: (X, Y) are the rotating center coordinates.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
ICON File: address of icon file.
Analog Clock:
ICON Hour: select hour hand ID in icon file.
Center Coordinate: rotation center in icon.
Minute Hand:
ICON Minute: select minute hand ID in icon file.
Center Coordinate: rotation center in icon.
Second Hand:
ICON Second: select second hand ID in icon file.
Center Coordinate: rotation center in icon.
Use  button to modify current time.

Illustration of variable :

Beijing DWIN Technology Co., Ltd.

37

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.11 Dynamic Trend Curve
Selected Area: select window area, null if over range.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
Y_Central: select center line of trend curve.
VD_Central:
Trend curve value at center line, normally average of Max & Min value.

Curve Color: select color for trend curve.
MUL_Y: magnification in Y direction, by every 1/256.
Data Source Channel: select channel for trend curve.
Horizontal Spacing:
Transverse spacing between sampling points.

Illustration of variable :

Send command to serial port:

Frame header, Length, Command, Data channel, Data string to display the trend curve above.
A5 5A

18

84

01

0800 0700 0710 0733 0800 0800 0800

0800 0900 0908 0906

Beijing DWIN Technology Co., Ltd.

38

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.12 Table Display
Selected Area: select table area, null if over range.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer, starting address of the data in table.
Column/Row Number: set the size of table.
Start Display Column/Row:
Select starting column/row to be displayed.

Unit_Data_Num:
0x01-0x7F: length of data for one cell.
0x00: data in VP address defines the length of each column.
When Unit_Data_Num is 00, starting address of data will be (Row number/2,
round up to integer) backward from VP address.

Encoding Mode:
0x00: 8bit, 0x01: GB2312, 02: GBK, 03: BIG5, 04: SJIS, 05: UNICODE.

Set Character Interval MANUALLY: on/off.
Boarder Color: select table boarder color.
Text Color: select text color.
FONT0_ID: address of ASCII font file.
FONT1_ID: address of none-ASCII font file.
X/Y-Direction Size:
Select font size, accordant with width of fonts in font file.

Column Header: Valid Display/Invalid Display.
Row Header: Valid Display/Invalid Display.
Data for table can be loaded by 22.bin file. Refer to DGUS document for
detailed instruction.
Illustration of variable :

Beijing DWIN Technology Co., Ltd.

39

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

If the length of data is shorter than designated, please use 0xFFFF as end mark of data in this cell.
For oversized table, users can use slider to pull the table.

3.2.13 Basic Graphic Display
Selected Area: select window area, null if over range.
(Limit is only effective for 0x0001 - 0x0005 commands).

Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.

Beijing DWIN Technology Co., Ltd.

40

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

String Format
Address
VP
VP+1
VP+2

Definition
CMD
Data_Pack_Num_Max
DATA_Pack

Description
Command
Data Pack Number

Data Pack for Basic Graphic
CMD

Function

0x0001

Dot

0x0002

Line

0x0003

Rectangle

0x0004

Rectangle
Area Fill

0x0005

Circle

0x0006

Picture
cut/paste

0x**07

Icon
Display

0x0008

Area fill

0x0009

Vertical line

Description of Data Pack Format, by word
Relative
Length Definition Description
Address
0x00
2
(x, y)
Dot coordinates.
0x02
1
Color
Dot color.
0x00
1
Color
Line color.
0x01
2
(x, y)0
Vertex 0 coordinates.
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.
0x02
2
(x, y)e
Bottom-right coordinates.
0x04
1
Color
Rectangle’s color.
0x00
2
(x, y)s
Top-left coordinates.
0x02
2
(x, y)e
Bottom-right coordinates.
0x04
1
Color
Filled color.
0x00
2
(x, y)
Circle center coordinates.
0x02
1
Rad
Radius of circle.
0x03
1
Color
Circle color.
0x00
1
Pic_ID
Image ID of cutting area.
0x01
2
(x, y)s
Top-left coordinates of the cutting area.
Bottom-right coordinates of the cutting
0x03
2
(x, y)e
area.
0x05
2
(x, y)
Paste position on current screen.
0x00
2
(x, y)
Top-left coordinates of icon.
Icon ID in icon file, high byte of command
0x02
1
ICON_ID
specifies address of icon file, display
mode is transparent.
0x00
2
(x, y)
Sampling dot coordinates.
0x02
1
COLOR
Filled color.
0x00
1
Color0
0x01
1
X0
Connect (X0, Y0s) (X0, Y0e) with color 0
0x02
1
Y0s
0x03
1
Y0e

Judging condition:
0xFF: finish operation,
0xFE: skip to next step.

Send command to serial port:

Frame header, Length, Command, Address, Controlling bytes, Data pack, Coordinate, Color
A5 5A

11

82

20 00

00 03

00 01

00 64 00 64 02 8C 01 90

F8 00

To get the rectangle above.

Beijing DWIN Technology Co., Ltd.

41

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.14 Special Industrial Application
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.

String Format
Address
VP
VP+1

Definition
CMD
Data_Pack_Num_Max

VP+2

DATA_Pack

Description
Command
Data Pack Number

Data pack for Special Industrial Application
Description of data pack format, by word
CMD

0x0001

Function

Overlapped
Area of
Multiple
Circles Fill

Beijing DWIN Technology Co., Ltd.

Relative
Address

Length

Definition

Description

0x00

1

Color0

Color of “Safe Zone”.

0x01

1

Color1

0x02

1

Color2

0x03

1

Color3

Color of circles.

0x04

1

Color4

Color of evasion.

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

0x0C+4*n

1

RAD2n_2

42

Color of normally overlapped
(Overlapped once).
Color of High-Risk overlapped
(Overlapped twice or more).

area
area

The bigger radius of No. n concentric
circles.
The smaller radius of No. n concentric
circles.

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.15 Bit Variable Icon
Selected Area: (X, Y) are coordinates of top-left of icons.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
AP: substitutive variable pointer, reserved 2 words.
Bit Icon ON (1) /OFF (0): define BITs to display.
Disp. Mode: shown as the following table.
Align Mode:
0x00: X++, space unreserved for undesignated bits.
0x01: Y++, space unreserved for undesignated bits.
0x02: X++, space reserved for undesignated bits.
0x03: Y++, space reserved for undesignated bits.
Interval: spacing between icons.

Icon File ID: address of icon file.
ICON0S:
Icon ID for bit0 in non-animation mode, or starting
Icon ID for bit0 in animation mode.

ICON0E: ending icon ID for bit0 in animation mode.
ICON1S:
Icon ID for bit1 in non-animation mode, or starting
Icon ID for bit1 in animation mode.

ICON1E: ending icon ID for bit1 in animation mode.
ICON Mode: Transparent/Opaque.
Initial Value: Set the initial value & save it in the 22 config file,the system will be
initiated according to 22 config file when the DGUS is started.

Beijing DWIN Technology Co., Ltd.

43

www.dwin.com.cn

Professional, Creditable, Successful
Display_Mode

DGUS_SDK User Guide V5.1

Value of bit
0

1

0x00

ICON0S

ICON1S

0x01

ICON0S

Null.

0x02

ICON0S

Animation: ICON1S - ICON1E.

0x03

Null.

ICON1S

0x04

Null.

Animation: ICON1S - ICON1E.

0x05

Animation: ICON0S - ICON0E.

ICON1S

0x06

Animation: ICON0S - ICON0E.

Null.

0x07

Animation: ICON0S - ICON0E.

Animation: ICON1S - ICON1E.

Illustration of variable  (on bottom of screen):

Beijing DWIN Technology Co., Ltd.

44

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.16 Timer Variable
Selected Area: (X, Y) are the top-left coordinates of data.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
Color: data color.
Font Lib ID: address of font file, 8bit encoding half-width.
Font Size: font size in X-direction.
Data length (Bytes): byte numbers to be displayed.
ASCII Separators: data string.
Convert: convert ASCII Separators into Hex Separators.
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 after as separator.
Some special chars: 0x00: none, Timer data will be concatenated; 0x0D: new
line.

Illustration of variable  (on top-right of screen):

Beijing DWIN Technology Co., Ltd.

45

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

3.2.17 RollText
Selected Area: (X, Y) are the top-left coordinates of data.
Preview: preview VAR display effect.
Name: name this button for viewing it in .xls file.
SP: stack pointer, default setting is 0xFFFF.
VP: variable pointer.
Text Color: data color.
Encoding Mode:
0x00: 8bit encoding,
0x01: GB2312,
0x02: GBK,
0x03:BIG5,
0x05: UNICODE.

Set Character Interval MANUALLY: on/off.
Roll-in Mode:
0X00=right to left
0X01=left to right
0X02=top to bottom
0X03=bottom to top
Roll-in Space: pixels to roll in each DGUS period.

Alignment: centered, left-aligned, right-aligned, top-aligned, button-aligned,
equal width, equal height.

Font0_ID: address of ASCII font file.
Font1_ID: address of non-ASCII font file.
Dot Matrix in X/Y-direction: select font size. Please note that parameter
should be the same with the size of font file.

Horizontal/Vertical Separation:
Pixel distance in Horizontal/Vertical.
Initial Value: Set the initial value & save it in the 22 config file,the system
will be initiated according to 22 config file when the DGUS is started.

Beijing DWIN Technology Co., Ltd.

46

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

4. Commands
4.1 Data Frame
Serial data frame is constituted with 5 parts as shown in chart below:
Data Block

1

2

Definition

Frame header

Data length

Data
Length

2
Defined by
R3

Description

and RA
parameter
in config.txt

3
Command
type

4
Data
string

5

1

1

N

2

Including
command type,
data string and
CRC checksum

0x80-0x84

CRC checksum

Enabled
by
R2
parameter in config.txt

4.2 Command Set
Function
Access
Register

CMD

Data

Description

0x80

ADR(0x00-0xFF)+Data_Pack
ADR(0x00-0xFF)+
RD_LEN(0x00-0xFF)
ADR(0x00-0xFF)+RD_LEN+
Data_Pack
ADR_H:(0x0000-0x6FFF)+DAT
A0…
+DATAn
ADR_H: L(0x0000-0x6FFF)+
RD_LEN(0x00-0x7F)
ADR_H:
L+RD_LEN+DATA0……+
DATAn

Write data in particular address of register

0x81

0x82
Access
Variable
SRAM

Trend
Curve
Buffer

0x83

0x84

CH_Mode(Byte)+DATA0(Word)+…+
DATAn

Read data in particular address of register
Response of DWIN LCD module
Write data in particular address of
variable SRAM
Read data in particular address of
variable SRAM
Response of DWIN LCD module
Write trend curve buffer.
CH_Mode defines the channels of
data :

Each bit in CH_Mode
corresponds to one channel.

CH_Mode. 0 corresponds
to channel 0.

Low
channel
ranges
ahead.

E.g.:
CH Mode=0x83(10000011B),

data
format
like
"CH7+CH1+CH0"

Register is accessed by every byte, variable SRAM and trend curve buffer is accessed by word.

4.3 Register
Register, 256 bytes, is used for hardware operation and process control.
Register
Address
0x00

Description

Version

Length
(Byte)
1

0x01

LED_NOW

1

LED brightness, 0x00-0x40.

0x02

BZ_TIME

1

Buzzer beeping time, by every 10ms.

0x03

PIC_ID

2

0x05

TP_Flag

1

Definition

Beijing DWIN Technology Co., Ltd.

DGUS version number, BCD code, 0x10 indicates V1.0.

Read: read current picture ID.
Write: switch to specific picture ID.
0x5A: there is update of touching area.
Others= no updating.
TouchPanel data is no longer updated if user did not clear the flag

47

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

after data retrieving.
0x06

TP_Status

1

0x07

TP_Position

4

0x0B

TPC_Enable

1

0x0C-0x0F

Reserve

4

0x01: first click.
0x03: pressing down.
0x02: uplift pressing.
Others: null.
Coordinate of touching position: X_H:L, Y_H:L.
0x00: disable the touchPanel.
Others: enable the touchPanel.
Default setting: 0xFF.
Undefined.

0x10-0x1A

R0-RA

11

Mapping of SD card config. register, read only.

0x1F

RTC_COM_ADJ

1

0x5A: RTC data is rewritten through serial port, cleared after RTC auto
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. “04” means Thursday, it can be
written as any day you choose.
0x30-0x3F
Reserve
16
Undefined.
0x40

En_Lib_OP

1

0x41

Lib_OP_Mode

1

0x5A: applying writing in font flash memory, clear after operation.
0x50: Transfer data from variable SRAM to font flash memory.
0xA0: Transfer data from font flash memory to variable SRAM.

Designate font address for data exchange. Total space are 16MB, font
space: 0x40-0x7F, maximum space of every font is 128KW.
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.
Designate variable SRAM addresses for data exchange. Specified the first
0x46
VP
2
(word) address for data operation in font storage, 0x00:00-0x6F:FF.
0x48
OP_Length
2
Length of exchanged data, by word.
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.
16-bit software timer, in term of 4ms, auto-decrement to
0x4A
Timer0
2
0.
0x42

Lib_ID

1

0x4C

Timer1

1

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

0x4D

Timer2

1

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

0x4E

Timer3

1

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

0x4F

Key_code

1

0x50-0xFF

Reserve

182

Maximum
error
+/_4ms.

is

Address of key code for 13 touch control config. file, 0x00: null.
Clear after operation executed.
Undefined.

Register is accessed by command 0x80/0x81.

DGUS Register Space: 0x00H-0xFFH, is written / read by byte.
DGUS Variable Data Memory Space: 0x0000H-0x6FFFH, is written / read by word.
Data in Curve buffer is written / read by word.
The communication between DGUS LCMs & Controllers (MCU) are driven by Variables that you may read and write in
corresponding address.

Beijing DWIN Technology Co., Ltd.

48

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

4.4 VP & SP
4.4.1 VP (Variable Pointer)
4.4.1.1 About VP
VP is the initial address of variables in variable SRAM (56KB) which separated into 28672 pcs of memory spaces from 0x0000
to 0x6FFF occupying two bytes for each below. (High bytes and Low bytes)

Starting Address

Length

The communication between DGUS LCMs and host is oriented by variables that you may read or write in corresponding
address. Reading &Writing of initial address and variable length could be changed via Command 0x82&0X83 if known in advance.

4.4.1.2 How to use VP?

 Assign VP for each variables
Each variable should be assigned a VP, yet overlap is not allowed. The value of the variable will be saved from the VP. For
example, variable 1 as a long integer saved in 0x1001 while variable 2 as an integer have to be stored on another address
preventing 0x1001 and 0x1002 from conflicts with variable 1.

VP of variable 1
0x1001

Length of variable 1
2 words

VP of variable 2
0x1003

Beijing DWIN Technology Co., Ltd.

Length of variable 2
2 words

49

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

 Set VP via DGUS_SDK
For example, display and input a variable (No. 100) which is an integer. The VP of this variable is 0x1000.

VP

Beijing DWIN Technology Co., Ltd.

00
64

Length

50

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Supposing that reading & writing to the same one, touch and input parameters of VP should be the same accordingly.

4.4.2 SP (Stack Pointer)
4.4.2.1 About SP
SP is the initial address for saving variable attributes which described features of the variables, such as font color, font size and
unit of variables, etc. The variable attributes refers to the Chapter Five of DGUS Dev. Guide.

SP shares the same SRAM with VP from 0x0000 to 0x6FFF. It is only used for variable display but overlap exception.

Beijing DWIN Technology Co., Ltd.

51

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

4.4.2.2 How to use SP?
 Set SP via DGUS_SDK
Take “Data Display” as example:

SP
0x5000

VP

X, Y

Color
Lib_ID
Font_X_Dots
Aligment Mode

。
。
。

Beijing DWIN Technology Co., Ltd.

52

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

 Change variable attributes via SP
Same sample as above:
In operation, if user attempts to do the changes on data color to red, just need able to write down a new value into
corresponding address.

SP=0x5000
The color is saved
in 0x5003

Frame header (2 Bytes)+Data length (1 Byte)+Command (1 Byte)+Data (N Byte: ADR+data/LEN)+CRC (2 Bytes, optional)
Send:5A A5 05 82 50 03 F8 00
Description:
5003: the address of color
F800: the value of red color

4.5 Examples
Configure frame header and baud rate in CONFIG.TXT via DGUS SDK as below:
R1=07
R3=5A
RA=A5

Frame header (2 Bytes)+Data length (1 Byte)+Command (1 Byte)+Data (N Byte: ADR+data/LEN)+CRC (2
Bytes)
Beijing DWIN Technology Co., Ltd.
53
www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

4.5.1 Access Register of DGUS
4.5.1.1 Write Data into Register
Switch current picture to pic_3:

Send: 5A A5 04 80 03 00 03
Description: 03: Register for Picture ID
00 03: Appoint picture ID
4.5.1.2 Read Data from Register
Handshaking:Read DGUS version (V 5.7):

Send: 5A A5
Description:

03 81

00 01

00: Register for DGUS Version

01: Read data by a byte

4.5.1.3 Response from the DGUS module
Receive: 5A A5 04 81 00 01 47
Description: 47: The version is 47 (V 4.7)

Beijing DWIN Technology Co., Ltd.

54

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

4.5.2 Access Variable SRAM
4.5.2.1 Write Data into variable SRAM
Write Data 100 to VP=0x0010

Send: 5A A5
Description:

05 82

00 10

00 64

0010: Variable pointer

0064:Data 100 in hexadecimal format

4.5.2.2 Read Data from variable SRAM
Send: 5A A5 04 83 00 10 01
Description: 0010: Variable pointer
01: Read data by a word

4.5.2.3 Response from the DGUS module
Receive: 5A A5 05 83 00 10 01 00 20
Description: 0020: Data 32 in hexadecimal format
4.5.3 Dynamic Trend Curve Display
Send: 5A A5
Description:

12 84

12 00 32 00 72 00 9F 00 04 00 17 00 36 00 93 00 1A

12: Channel 4 & Channel 1, 8bit(0001 0010)

Beijing DWIN Technology Co., Ltd.

55

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Display the trend curve in the same area

Display the trend curve in the different area simultaneously

4.5.4 Basic Graphic Display
String Format
Address

Definition

Description

VP

CMD

Command.

VP+1

Data_Pack_Num_Max

VP+2

DATA_Pack

Max number of data packs.
For command 0x0002, it’s number of graph.

Date Pack For Basic Graphic
Description of Data Format, by word
CMD

Function

0x0001

Dot

0x0002

0x0003

0x0004

0x0005

0x0006

Relative
Address

Data
Length

Definition

Description

0x00

2

(x, y)

Coordinate of dot.

0x02

1

Color

Color of dot.

0x00

1

Color

Color of line.

0x01

2

(x, y)0

Coordinate of vertex 0.

0x03

2

(x, y)1

Coordinate of vertex 1.

0x01+2*n

2

(x, y)n

Coordinate of vertex n.

0x00

2

(x, y)s

Coordinate of top-left.

0x02

2

(x, y)e

Coordinate of bottom-right.

0x04

1

Color

Color of rectangle.

0x00

2

(x, y)s

Coordinate of top-left.

0x02

2

(x, y)e

Coordinate of bottom-right.

0x04

1

Color

Filled color.

0x00

2

(x, y)

Coordinate of center of circle.

0x02

1

Rad

Radius of circle.

0x03

1

Color

Color of circle.

Picture

0x00

1

Pic_ID

Image ID of cutting area.

Cut/Paste

0x01

2

(x, y)s

Coordinate of top-left of cutting area.

Line

Rectangle

Rectangle
Area Fill

Circle

Beijing DWIN Technology Co., Ltd.

56

www.dwin.com.cn

Professional, Creditable, Successful

0x**07

0x0008

0x0009

DGUS_SDK User Guide V5.1

0x03

2

(x, y)e

Coordinate of bottom-right of cutting area.

0x05

2

(x, y)

Paste position on current screen.

0x00

2

(x, y)

Coordinate of top-left of icon.

0x02

1

ICON_ID

0x00

2

(x, y)

Coordinate of sampling dot.

0x02

1

Color

Filled color.

0x00

1

Color0

Vertical

0x01

1

X0

Line

0x02

1

Y0s

0x03

1

Y0e

Icon
Display
Area Fill

Icon ID in icon file, high byte of command specifies
address of icon file, display mode is transparent.

Connect (X0, Y0s), (X0, Y0e) with color0.

Description of Data Format, by word
CMD

0x0001

0x0002

0x0003

0x0004

0x0005

0x0006

0x**07

0x0008

0x0009

Function

Relative

Data

Address

Length

0x00

Definition

Description

2

(x, y)

Coordinate of dot.

0x02

1

Color

Color of dot.

0x00

1

Color

Color of line.

0x01

2

(x, y)0

Coordinate of vertex 0.

0x03

2

(x, y)1

Coordinate of vertex 1.

0x01+2*n

2

(x, y)n

Coordinate of vertex n.

0x00

2

(x, y)s

Coordinate of top-left.

0x02

2

(x, y)e

Coordinate of bottom-right.

0x04

1

Color

Color of rectangle.

0x00

2

(x, y)s

Coordinate of top-left.

0x02

2

(x, y)e

Coordinate of bottom-right.

0x04

1

Color

Filled color.

0x00

2

(x, y)

Coordinate of center of circle.

0x02

1

Rad

Radius of circle.

0x03

1

Color

Color of circle.

0x00

1

Pic_ID

Image ID of cutting area.

Picture

0x01

2

(x, y)s

Coordinate of top-left of cutting area.

Cut/Paste

0x03

2

(x, y)e

Coordinate of bottom-right of cutting area.

0x05

2

(x, y)

Paste position on current screen.

0x00

2

(x, y)

Coordinate of top-left of icon.

0x02

1

ICON_ID

0x00

2

(x, y)

Coordinate of sampling dot.

0x02

1

Color

Filled color.

0x00

1

Color0

Vertical

0x01

1

X0

Line

0x02

1

Y0s

0x03

1

Y0e

Dot

Line

Rectangle

Rectangle
Area Fill

Circle

Icon
Display
Area Fill

Icon ID in icon file, high byte of command specifies address
of icon file, display mode is transparent.

Connect (X0, Y0s), (X0, Y0e) with color0.

Status Flag:
0xFF Current drawing operation finished.
0xFE This operation will be skipped (ignored).

Beijing DWIN Technology Co., Ltd.

57

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Take Circle Drawing for example

1) Add a basic graphic display via DGUS SDK software and set vp to 0x00A0 as below:

2) Send commands by serial port

Send:

5A A5

11 82 00 A0

Beijing DWIN Technology Co., Ltd.

00

05 00 01

01

58

64 00 EF

00 64

F8 00

FF

00

www.dwin.com.cn

Professional, Creditable, Successful

DGUS_SDK User Guide V5.1

Hex

Description

5A A5

Frame header

11

Data length

82

Command

00 A0

VP

00 05

Circle command

00 01

One circle

01 64

X coordinate of center of circle:356

00 EF

Y coordinate of center of circle:239

00 64

Radius of circle:100

F8 00

Color: red

FF 00

Drawing operation finished

Beijing DWIN Technology Co., Ltd.

59

www.dwin.com.cn


Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.7
Linearized                      : Yes
Author                          : DWIN
Create Date                     : 2015:02:13 16:05:29Z
Modify Date                     : 2017:09:22 15:40:46+02:00
XMP Toolkit                     : Adobe XMP Core 5.6-c015 84.159810, 2016/09/10-02:41:30
Format                          : application/pdf
Creator                         : DWIN
Title                           : Jason ZHANG
Creator Tool                    : WPS Office 个人版
Metadata Date                   : 2017:09:22 15:40:46+02:00
Document ID                     : uuid:3b4fa625-25c7-4ceb-9110-7d450b4c99fa
Instance ID                     : uuid:0cdfc24e-0a6a-4807-81db-80786b530db8
Page Count                      : 59
EXIF Metadata provided by EXIF.tools

Navigation menu