Command Set V2.4
Command Set V2.4
COMMAND SET
Version 2.4
Index
1 SERIAL PORT SPECIFICATIONS ............................................................................................................. 1
1.1 Serial Port Work Mode ............................................................................................................. 1
1.2 Data Frame Structure ............................................................................................................... 1
1.3 Communication Frame Buffer (FIFO) ....................................................................................... 1
1.4 Byte Transmission Order .......................................................................................................... 2
1.5 Data Transmission Direction .................................................................................................... 2
2 COMMANDS TABLE.............................................................................................................................. 3
3 COMMAND SET SPECIFICATIONS ........................................................................................................ 6
3.1 Handshaking (0x00) .................................................................................................................. 6
3.2 Set the Current Palette (0x40) .................................................................................................. 6
3.3 Set Character Spacing (0x41) .................................................................................................... 6
3.4 Select the Color of Specific Position (0x42, 0x43) ................................................................... 7
3.5 Set Cursor Mode (0x44) ............................................................................................................ 7
3.6 Text Display Command (0x53, 0x54, 0x55, 0x6E, 0x6F, 0x98, 0x45) ........................................ 7
3.6.1 Display Standard Font (0x53,0x54,0x55,0x6E,0x6F)....................................................... 8
3.6.2 Display Custom Font Library (0x98) ............................................................................... 8
3.6.3 Set /Cancel Textbox Limitation (0x45) .......................................................................... 12
3.7 Put Pixel Command (0x50, 0x51, 0x74, 0x72) ........................................................................ 12
3.7.1 Put Pixel in specific coordinate(0x50, 0x51) ................................................................. 12
3.7.2 Dynamic Curve Display (0x74) ...................................................................................... 12
3.7.3 Direct Memeroy Operation (0x72) ............................................................................... 13
3.8 Draw Line Command (0x56, 0x5D, 0x75, 0x76, 0x78)............................................................ 13
3.8.1 Draw Specific Pixels (0x56, 0x5D) ................................................................................. 13
3.8.2 Draw Spectrum (0x75) ................................................................................................. 14
3.8.3 Drawy Line Chart (0x76) ............................................................................................... 14
3.8.4 Draw Line by Offset (0x78) ........................................................................................... 14
3.9 Draw Arc Command (0x57) .................................................................................................... 15
3.9.1 Draw Arc or Circle Area (0x57) ..................................................................................... 15
3.9.2 Draw Arc Segment (0x5704) ......................................................................................... 15
3.10 Display Area Command ........................................................................................................ 16
3.10.1 Display The Rectangle or Rectangle area (0x59, 0x69, 0x5A, 0x5B, 0x5C) ............... 17
3.10.2 Fill Area (0x64) ........................................................................................................... 17
3.10.3 Fill Double Color Bitmap (0x73) ................................................................................. 17
3.11 Clear Screen Command (0x52) ............................................................................................. 17
3.12 Move Specific Area Command (0x60, 0x61, 0x62, 0x63)..................................................... 17
3.13 Picture or Icon Command (0x70, 0x71, 0x99, 0xE2, 0x7B, 0x9E,0x97)................................ 18
3.13.1 Display Picture (0x70)................................................................................................. 18
3.13.2 Display Picture & Calculate the CRC Checksum (0x7B) .............................................. 18
3.13.3 Display Cutting Icon (0x71、0x9C、0x9D) ................................................................ 18
3.13.4 Display Self-defined Icon (0x99) ................................................................................. 21
3.13.5 Save the Current Screen Picture to UART LCM (0xE2) ............................................... 21
3.13.6 Save the Current Screen Picture Area in Temporary Buffer (0xE9) ............................ 21
3.13.7 Restore Picture Area Saved in Temporary Buffer (0x7F) ............................................ 21
3.13.8 Display Cutting Icon after Rotation (0x9E, H600 and K600+ only ) ............................ 21
3.13.9 Display Icon (0x97, K600+ only) ................................................................................. 20
3.14 Backlight Brightness Control Command (0x5E, 0x5F).......................................................... 23
3.14.1 Turn off Backlight (0x5E) ............................................................................................ 23
3.14.2 Set Touching Function (keyboard control) Backlight Mode (0x5E) ............................ 23
3.26.1 Touching Function Interface Switch Automatically (0x1E, 0x1A configuration files) . 35
3.26.2 Keyboard Control Interface Auto-switch (0x1B configuration file) ............................ 38
3.26.3 Automatically Loop Command Group (0x1C configuration file) ................................ 38
3.26.4 Icon Display (0x1D configuration file) ........................................................................ 39
3.27 Switching Bewteen UART LCM and Video Command (0x7A. The hardware supported is
required) ............................................................................................................................................... 40
3.28 Refresh A Full Screen Display Compulsively once(0XD0) ...................................................... 40
3.29 Input Parameters or Text with the Touch Screen Command (0x7C, H600 and K600+ only). 41
3.29.1 Input Pure ASCII String (0x7C01) .................................................................................. 42
3.29.2 Input Mixed String Both Chinese and English (0x7C02) ............................................... 42
3.29.3 Quit Text Input Method Compulsively (0x7C 00) ......................................................... 43
4 Upgrade Method of UART LCM Software ......................................................................................... 45
5 Download Specification of SD Card Interface ................................................................................... 46
6 C51 Serial Communication Program Reference ................................................................................ 48
7 Revision History ................................................................................................................................. 50
2 Commands Table
CATEGORY COMMAND DESCRIPTION
Handshake 0x00 Check the configuration and version information
0x40 Set palette
Display 0x41 Set characters spacing
Parameter 0x42 select color to the background color palette
Configuration 0x43 select color to the Foreground color palette
0x44 Set cursor display mode
0x53 8×8 dot matrix ASCII characters
0x54 16×16 dot matrix GBK extended string to display
0x55 32×32 dot matrix GB2312 internal code string display
Text Display 0x6E 12×12 dot matrix GBK extended code string display
0x6F 24×24 dot matrix GB2312 internal code string display
0x98 Any dot matrix, any code string display
0x45 Open/Close the text frame limitation
0x50 Put multiple pixels with background color (Delete pixels)
0x51 Put multiple pixels with foreground color
Put Pixel
0x74 Dynamic curve fast puts pixels
0x72 Direct memory operation
Connect specific pixels with the Foreground color line(Display
0x56
polygon)
Connect specific pixels with the background color line (Delete
0x5D
Line &Polygon polygon)
0x75 Fast Draw continuous vertical line (Spectrum)
0x76 Fast Draw line chart
0x78 Connect offset
Arc &Circle
0x57 Reverse/Display multiple arc or circle area
Area
Draw multiple rectangular with foreground color (Display
0x59
rectangle)
Rectangle
Draw multiple rectangular with background color (Delete
0x69
rectangle)
0x73 Fill special area with double color bitmap
0x64 Fill special area
0x52 Clear screen
0x5A Clear many special areas
Areas 0x5B Fill many specific areas
Operation 0x5C Reverse many specific areas color
0x60 Many specific areas loop and shift left
0x61 Many specific areas loop and shift right
0x62 Many specific areas shift left
0x63 Many specific areas shift right
0x70 Draw a full screen picture
Draw 0x7B Draw a full screen picture and calculate CRC checksum
Picture/Icon 0x71 Cut icon from the specific picture and paste to the current page
0x9C Cut icon from the specific picture to filter out background and
Video
0x7A Switch video and UART LCM
Switching
Close backlighting or set the touching function(Key
0x5E
Backlight control)backlight model
Operation Open backlighting or PWM model to adjust the backlight
0x5F
brightness
Open/Close clock automatically overlay and display; read the
Clock 0x9B
current clock
Operation
0xE7 Set clock
Configure the speed of user serial port, touch screen data upload
0xE0 format, backlight control mode and display mode;H600/K600+
Parameter
kernel does not save when power-down
Configuration
Similarly 0xE0 command functions, but the power to save; H600
0xE3
and K600+ only
0xB001 Pinyin input method based in the first level of font
Practical 0xB002 Calculate(A×B+C)/D,E is 4 bytes quotient,F is two bytes remainder
Algorithm 0xB003 Unsigned integer(2 bytes) array sort
0xB004 GBK font-based Pinyin input query
0x30 Play music that specific storage location
Sound 0x32 Real-time volume adjustment
Operation 0x33 Immediately stop playing
0x3F Sound operation response
Software Kernels software are upgraded online by serial
DWIN_M600_BOOT!
Upgrade port
The sequence of kernel development keeps downward compatible with command set. The
development order is : M100、M600、K600、H600、K600+ kernel.
M100 kernel and M600 kernel command set are completely same;
Kernels above K600 have different drivers. So we increase the 0xD0 command on the basis of
M100、M600;K600, M100 and M600 kernels command set are completely same;
Under the premise of H600 compatible with K600, we add the 0x7C、0x9E and 0xE3
commands. The part of serial port screens support SD card to download;
Under the premise of K600+ compatible with H600, we add the 0x97 command. Download is
completely supported with SD card in corresponding serial port screens;
All values will be maintained unless users reset values. The default values will be restored if the
user resets UART LCM hardware.
3.3 Set Character Spacing (0x41)
TX: AA 41 <D_X> <D_Y> CC 33 C3 3C
Rx: None
<D_X>: Character spacing in X direction (column spacing) from 0x00 to 0x7F. Default reset value
is 0x00.
<D_Y>: Character spacing in Y direction (line spacing) from 0x00 to 0x7F. Default reset value is
0x00.
All values will be maintained unless users reset values. The default values will be restored if the
user resets UART LCM hardware.
3.4 Select the Color of Specific Position (0x42, 0x43)
Tx: AA <CMD> <X> <Y> CC 33 C3 3C
Rx: None
<CMD>: Select the background color palette with the color of specific position using the 0x42
command. Select the foreground color palette with the specific position using the 0x43 command.
<X> <Y>: The specific coordinates. (The coordinates of DWIN UART LCM are 2 bytes.)
Example 1:
AA 42 00 10 01 00 CC 33 C3 3C
Select color on x=16 (0x0010) y=256 (0x0100) to the background color palette.
Example 2:
AA 43 00 80 00 60 CC 33 C3 3C
Select color on x=128 (0x0080) y=96 (0x0060) to the foreground color palette.
3.5 Set Cursor Mode (0x44)
Tx: AA 44 <Cursor_EN> <X> <Y> <Cursor_Width> <Cursor_Height> CC 33 C3 3C
Rx: None
<Cursor_EN>
0x01: Set cursor OFF. The cursor will be displayed on (X, Y);
0x00: Set cursor ON;
<X>, <Y> are the left-up coordinates of the cursor;
<Cursor_Width>: Cursor Wide (0x01-0x1F);
<Cursor_Height>: Cursor High (0x01-0x1F);
0x6E: Display 12*12 dot matrix extended Chinese Character string (ASCII characters are
displayed with DBC case 6*12 dot matrix);
0x6F: Display 24*24 dot matrix internal Chinese Character string (ASCII characters are
displayed with DBC case 12*24 dot matrix);
<X> <Y> : The starting coordinates of string (The left-up coordinates of the first character);
<String>: The print string. Chinese Characters are encoded by GB2312 (0x55, 0x6F; internal
code) or GBK (0x54, 0x6E, extended internal code). Set the display color using the 0x40 command.
Set the display character spacing using the 0x41 command, and line wrap at the end. The 0x0D and
0x0A commands are used to indicate the "return" and "line wrap". (The 0x0D and 0x0A commands
represent/mean “return” and ”line wrap”)
Example:
AA 55 00 80 00 30 48 6F 77 20 61 72 65 20 79 6F 75 20 3F CC 33 C3 3C
Print 32*32 string "How are you?" on (128, 48).
3.6.2 Display Custom Font Library (0x98)
Tx: AA 98 <X> <Y> <Lib_ID> <C_Mode> <C_dots> <Fcolor> <Bcolor> <String> CC 33 C3 3C
Rx: None
<X> <Y>: The left-up coordinates of the first character.
<Lib_ID>: The font library ID, 0x00-0x3B, corresponding to the font position with the command
0xF2.
The memory size of the UART LCM kernel is 32MB. The memory is arranged as 60 areas. The
definition of Lib_ID is listed as follows:
Lib_ID Capacity Description Factory default value
0x00-0x1F 128KB There are 32 small fonts whose size is 128KB. 0x00=ASCII character
Generally, the user can design different style for library, please don’t
special icon or ASCII characters. modify it.
0x01=Pinyin input
method thesaurus
0x02-0x19: Free
0x1A-0x1F: Touching
function configuration
files
0x20-0x3B 1MB There are 28 large fonts whose size is 1 MB. 0x20=12×12 GBK Song
Single font can contain the GBK extended font 0x21=16×16 GBK Song
of maximum 16 dot matrix (12×12 or 16×16 0x22=24×24 GBK Song
dot matrix), or GB2312 secondary font of 0x23=32×32 GBK Song
maximum 32 dot matrix (12×12, 16×16, 0x24-0x3B:Free
24×24,32×32);
The font can be combined for supper large
font library at most 28 MB. The 0x98 or 0xF2
command is the first font address when
combination,;
Example: The 32 dot matrix UNICODE font will
take up the 8 MB font space. We can allocate the
Description:
<C_Mode>: The high bits are bit7- bit 4 and the low bits are bit 3- bit 0.
When C_Mode.4=1 enabled, characters must be 8 bit encoding and download font that needs to
rotate 90 ° (TS3, vertical mode 1)
The user only can use custom font library to display ASCII (Or other fonts of 8 bit encoding with the
0x98 command. The user can’t use 0x01-0x04 encoding mode (GB2312, GBK, BIG5, SJIS and GBK).
In 0x01-0x40 encoding mode, UART LCM will automatically use the 0x00 font to display ASCII. The
0x00 font (DWINASC.HZK file) contents description is listed as below:
The description of 0x00 font (DWINASC.HZK) Content
Bytes Number of Occupied The Starting Storage
ASCII Dot matrix Character Number
per word Memory Size Address
8*8 128 8 2KB 0x0:0000
8*12 128 12 3KB 0x0:0800
6*12 128 12 1.5KB 0x0:1400
8*16 128 16 2KB 0x0:1A00
12*24 128 48 6KB 0x0:2200
16*32 128 64 8KB 0x0:3A00
20*40 128 120 15KB 0x0:5A00
24*48 128 144 18KB 0x0:9600
28*56 128 224 28KB 0x1:0000
32*64 128 256 32KB 0x1:7000
Please consult DWIN technical supporters concerning the word 0x00 modify mode.
All files are encoded in X direction from left to right and y direction from top to bottom in font. The
storage mode is high level first scan (Most Significant Bit, MSB). 1 byte=8 bit. Bits are written from
high bit to low bit. The mode is shown as below:
Recommend that the user selects the dot matrix font extraction software TS3 to generate font.
The palette properties which are set by users will not be altered with this command.
3.7.3 Direct Memory Operation (0x72)
Tx: AA 72 <Address_H:M:L> <Point_data0……Point_datan> CC 33 C3 3C
Rx: None
This command is mainly used to download pictures to UART LCM. Generally, it’s not necessary for
the users.
3.8 Draw Line Command (0x56, 0x5D, 0x75, 0x76, 0x78)
3.8.1 Connect Specific Pixels (0x56, 0x5D)
Tx: AA <CMD> < (x0, y0) (x1, y1) …… (xi, yi)> CC 33 C3 3C
Rx: None
<CMD>
0x56: Connect specific pixels to a line with the foreground color (Use the command 0x40 to set
the foreground color).
0x5D: Connect specific pixels to a line with the background color (Use the command 0x40 to
set the background color).
< (x0, y0) (x1, y1) …… (xi,yi)>: The coordinates of connected pixels.
Example:
AA 56 00 28 00 32 00 78 00 70 00 B1 00 3A CC 33 C3 3C
Connect three pixels to a line with the foreground color on (40, 50) (120,112) (177,58).
AA 56: Connect specific pixels to a line.
00 28 00 32: Hexadecimal value of (40,50);
00 78 00 70: Hexadecimal value of (120,112);
00 B1 00 3A: Hexadecimal value of (177, 58). The result is shown as follows:
Rx: None
<x, y>: The starting coordinates of a connection line.
<dxn, dyn>: 1 byte offset of x and y. The highest bit (.7) is sign bit. “1” indicates negative.
3.9 Draw Arc Command (0x57)
3.9.1 Draw Arc or Circle Area (0x57)
Tx: AA 57 (<Type_0> <X_0> <Y_0> <R_0>) …… (<Type_i> <X_i> <Y_i> <R_i>) CC 33 C3 3C
Rx: None
<Type_i>: Arc or curve display mode
0x00: Reverse the color of the arc or curve
0x01: Display the foreground color of the arc or curve (Use the command 0x40 to set the
foreground color)
0x02: Reverse the color of the specific circle area
0x03: Display the foreground color to the specific circle area (Use the command 0x40 to set the
foreground color)
<X_i> <Y_i>: The center coordinates of arc or curve
<R_i>: The radius of arc or curve (0x01-0xFF)
Example:
AA 57 01 00 60 00 60 40 CC 33 C3 3C
Draw an arc with the foreground color. The circle center is on (96, 96) and the radius is 64.
AA 57: Display an arc curve;
01: <Type_0>: Display the specific arc with the foreground color;
00 60 00 60: The coordinates on (96,96);
40: The circular radius is 64. The result is shown as follows:
start angle is 0° and the end angle is 90°. The result is shown as follows:
0x62: The specific area to shift right: from right to left. Lost the far left area and fill the far right
area with the background color filling (Use the command 0x40).
0x63: The specific area to shift left: from left to right. Lost the far right area and fill the far left
area with the background color filling (Use the command 0x40).
<Xs_i> <Ys_i> <Xe_i><Ye_i>: (Xs_i, Ys_i) are coordinates of specific area at the left-up corner and
right-down corner.
<N_i>: The number of pixels in moving area, from 0x01 to 0x0F.
Example:
AA 60 00 40 00 40 00 80 00 80 08 CC 33 C3 3C
Move 8 pixels from left-up to right-down. The left-up coordinate is on (64,64) and the right-down
coordinates is on(128,128). The result is shown as follows:
This command is used to check picture which has been downloaded in Flash in order that the
download is correct.
3.13.3 Display Cutting Icon (0x71、0x9C、0x9D)
Tx: AA 71 <Pic_ID> <Xs> <Ys> <Xe> <Ye> <X> <Y> CC 33 C3 3C
Or: AA 9C <Pic_ID> <Xs> <Ys> <Xe> <Ye> <X> <Y> CC 33 C3 3C
Or: AA 9D <Pic_ID> <Xs> <Ys> <Xe> <Ye> <X> <Y> CC 33 C3 3C
Rx: None
<Pic_ID>: The ID (Corresponding to the command 0xE2) of the saved pictures in UART LCM Flash
Memory
<Xs> <Ys> <Xe> <Ye>: (Xs, Ys) is the left-up coordinates of the original picture of area that users
will cut; (Xe,Ye) are the right-down coordinates.
<X> <Y>: The left-up coordinates of the original picture of area that users have already cut.
Example1:
AA 71 08 01 90 00 00 03 1F 01 90 00 C8 00 14 CC 33 C3 3C
Cut the eighth picture’s area on (400,0) (799,400) and display on (200,200) in current screen. The
result is shown as follows:
Example2:
AA 9C 01 00 D0 00 D0 02 0A 01 3E 00 BA 00 AE CC 33 C3 3C
Cut the first picture’s area on (208,208) (522,318) and display on (186,174) in current screen. The
result is shown as follows:
Pic_0=0x00 Pic_1=0x01
And then cut the first picture’s area on (255,412) (308,442) and display on (186,174) in current
screen using the 0x9C command. The result is shown as follows:
The background color of cutting picture cannot be displayed to achieve “transparent” effect with
the 0x9C and 0x9D commands. Note: The background must be solid color when using the 0x9C and
0x9D command. The background color of cutting picture can be automatically restored using the
current background before executing the 0x9C command. But the background cannot be
automatically restored before executing the 0x9D command. Pictures can be overlaid with the
0x9D command.
3.13.4 Display Self-defined Icon (0x99)
Tx: AA 99 <X0, Y0, Icon_ID0>……<Xn,Yn,Icon_IDn> CC 33 C3 3C
Rx: None
<Xn,Yn>: The coordinates of the users’ icon
<Icon_IDn>: The index ID of the users’ icon, 2 bytes
The icon of user needs pre-define in 0x1D configuration file. The details refer to 3.26.4 section
3.13.5 Save Current Screen Picture to UART LCM (0xE2)
Tx: AA E2 <Pic_ID> CC 33 C3 3C
Rx: None
<Pic_ID>: The picture index ID to be saved
3.13.6 Save Current Screen Picture Area to Temporary Buffer (0xE9)
Tx: AA E9 Xs Ys Xe Ye CC 33 C3 3C
Rx: None
Xs Ys Xe Ye: The left-up and right-down coordinates.
0xE9, K600, H600 and K600+_XGA only
3.13.7 Restore Picture Area Saved in Temporary Buffer (0x7F)
Tx: AA 7F Xs Ys Xe Ye CC 33 C3 3C
Rx: None
Xs Ys Xe Ye: The left-up and right-down coordinates of the restored area.
0x7F, K600_XGA only
3.13.8 Display Cutting Icon after Rotation (0x9E, H600 and K600+ only)
Tx: AA 9E <Mode> <Pic_ID> <Xs> <Ys> <Xe> <Ye> <Xc> <Yc> <AL> <Xc1> <Yc1> CC 33 C3 3C
Rx: None
<Mode> 0x00=Transparently cut, (Xs, Ys) location is the background;
0x01=Opaque cut;
<Pic_ID>: the index ID of saved picture in the UART LCM flash memory (Use the command 0xE2
to set). Two bytes (0x0000-0xFFFF);
<Xs> <Ys> < Xe> <Ye> (Xs, Ys) are the left-up coordinates of the cutting area on the primary
Tip: Put the original pointer icon at the 0 calibration. The dashboard graduation will be uniformly
increased by clockwise. The angle of rotation and the actual parameters are linear corresponded.
3.13.9 Display ICON (0x97, K600+ only)
Tx: AA 97 <X> <Y> <Lib_ID> <MODE> <ICON_ID0>……<ICON_IDn> CC 33 C3 3C
Rx: None
<X> <Y>: The first coordinates of icon. The subsequent icon will be automatically calculated
coordinates. The Dis_X is set with 0x41 command decides the icon spacing. On the other word, the
second icon position= X+ width of icon + Dis_X
<Lib_ID>: The position of saved *.ICO file in (0x00-0x3B)
<MODE>: The options of background. 0x00=filter out the background; others= display
background
<ICON_ID0>……<ICON_IDn>: The ICON index ID of the icon in *.ICO files. Each ID has two bytes
from 0x0000-0xFFFF
Note:
The icon file (*.ICO file) is generated only with the DWIN icon generation tool software and the
specific font position can be only used SD card interface to download in DWIN screen.
Other picture files such as ICON, JPG, BMP can be generated with the DWIN icon generation tool
software according to the users specific ID in order to be called easily. But the dot matrix of these
files cannot be exceeded 255 X 255. You can download the DWIN icon generation tool software from
DWIN website.
The 0x97 ICON display command is mainly used to solve the problem which is 0x71 command cutting
icon on the picture. And the use is need to alignment.
The special effects are displayed perfectly with the 0x97 command, such as dashboard rotation,
WordArt and so on.
If users enable the touch interface processing function (Use command 0xE0 to set) and click on the
invalid area which is not uploaded the location of coordinates, it will not be uploaded with the
0x72 and 0x73 commands when clicking on the touch screen.
3.15.2 Automatically Upload the Key Code of Touching Function (0x78,
0x79)
If users enable the interface of the touching control or keyboard function (Use the command 0xE0)
and the key code of the touching control or keyboard function to transmit back, which is 2 bytes will
be automatically uploaded in UART LCM (Defined with 0x1E and 0x1B configuration files) when click
the valid area or keys. The touching code or key code is preset by the user.
Tx: None
Rx: AA 78 <Touch_Code> CC 33 C3 3C
Note: 0x79 is corresponding to 0x73 (Pressed the touch screen); 0x78 is corresponding to 0x72
(Released the touch screen)
3.15.3 Touch Screen Calibration Mode (0xE4)
Tx: AA E4 55 AA 5A A5 CC 33 C3 3C
According to the screen prompt operation click screen ” left-up ”, “right-up” and ” right-down” on
the white cross of the suggestion touching position after sending commands, the UART LCM will
upload the following commands when calibration is completed:
Rx: AA E4 4F 4B CC 33 C3 3C
DWIN's unique drift compensation technique can guarantee that products only need to calibrate
once after equipped in product life circle unless users re-equipped the touch screen;
Rx: AA C2 <Data_Pack> CC 33 C3 3C
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<Data_Length>: The length of the data read (Word) is 2 bytes.
<Data_Pack>: The data read.
3.18.3 Point Setting by Temporary Buffer (0xC101)
Tx: AA C1 01 <Address> <Point_Number> CC 33 C3 3C
Rx: None
<Address>: The starting address (word address) of temporary buffer (RAM) is totally 40k word
from 0x0000 to 0x9FFF.
<Point_Number>: The number of pixels, at most 13653. Each point is consisted of three words.
Point data format is defined in temporary buffer: (X, Y, Color).
3.18.4 Connect Lines with Data in Temporary Buffer (0xC102)
Tx: AA C1 02 <Address> <Line_Number> CC 33 C3 3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<Line_Number>: The maximum number of lines is 8191. Every line takes up 5 word unit.
line data format defined in temporary buffer: (Xs, Ys, Xe, Ye, Color).
3.18.5 Display Line Chart with Data in Temporary Buffer (0xC103)
Tx: AA C1 03 <Address> <x> <y> <Line_Number> <D_x> <Dis_x> <K_y> <Color> CC 33 C3 3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<x> is the starting coordinate.
<y>: The zero coordinate (The lowest point); the actual coordinate of connection point equals to
y-Ly.
<Line_Number>: The maximum number of lines is 40960 from 0x000 to 0x9FFF. Every line takes
up 1 word unit.
<D_X>: The points' distance in read buffer from 0x01 to 0xFF, i.e. Address=Address+D_x.
<Dis_X>: The increment of X-axis from 0x01 to 0x0F, i.e. x=x+Dis_x.
<K_y>: The amplification factor of Y-axis from 0x00 to 0xFF; 1/16 is the unit, i.e. K_y=32 means
amplify Y-axis twice.
<Color>is the color of lines without changing any variation in system palette.
The line data format in temporary buffer is defined as Ly (2 bytes), which is the height of point.
3.18.6 High-speed Display Line Chart with Data in Temporary Buffer
(0xC104)
Tx: AA C1 04 <Adr1> <x> <y> <Line_Number> <D_x> <Dis_x> <Color1> <Addr0> <Color0> CC 33 C3 3C
Rx: None
<x> : The starting coordinate .
<y>: The zero coordinate (the lowest point); the actual coordinate of connection point equals to
y-Ly.
<Line_Number>: The maximum number of lines is 40960. Every line takes up 1 word unit.
<D_x> Always sets to 0x01.
<Dis_X>: The increment of X-axis, from 0x01 to 0x0F; i.e. x=x+Dis_x after connecting one line.
<Addr0> <Addr1>: The starting address (word address) of temporary buffer (RAM), totally 40k
word from 0x0000 to 0x9FFF.
<Addr0>: The first address of the history curve of erasing in current window.
<Addr1>: The first address of the history curve of displaying in current window.
The absolute value is 100 from Addr1 to Addr0, if the window connects 100 data points and the
temporary buffer is only one curve,.
<Color0> <Color1> is the color of lines without any variation in system palette.
<Color0> should be set into the background color of the window.
<Color1> should be set the color of curve that is to be displayed.
The line data format in temporary buffer is defined as Ly (2 bytes), which is the height of point.
This command is generally similar with the 0xC103 command except that:
a. The points' distance in read buffer is fixed to 1.
b. Avoided flashing during refresh. The previous point 0 (Defined by Addr0 and Color0) will be erased,
before connecting next point (Defined by Addr1 and Color1) in order to display without flashing.
The speed of display line chart is the maximum 5500 points per second in this command when the
baud rate is 115200bps.
3.18.7 Display and Zoom Line Chart with Data in Temporary Buffer (0xC105)
Tx: AA C1 05 <Address> <x> <y> <Line_Number> <D_x> <Dis_x> <M_y> <D_y> <Color> CC 33 C3 3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<x>: The starting coordinates of X-axis.
<y>: The zero coordinate (The lowest point); the actual coordinate of connection point equals to
y-Ly.
<Line_Number>: The maximum number of lines is 40960 from 0x0000 to 0x9FFF. Every line
takes up 1 word unit.
<D_x> : The points' distance in read buffer from 0x01 to 0xFF; i.e. Address=Address+D_x after
connecting one line.
<Dis_x>: The increment of X-axis from 0x01 to 0x0F; i.e. x=x+Dis_x after connecting one line.
<M_y> <D_y>: Amplification factor of Y-axis from 0x00 to 0xFF; and height equals to Y×M_y/D_y.
For example, M_y=4, D_y=2 means amplify Y-axis twice.
<Color>: color of lines without changing any variation in system palette.
The line data format in temporary buffer is defined as Ly (2 bytes), which is the height of point.
3.18.8 Display and Zoom Window Limited Two-way Line Chart with Data in
Temporary Buffer (0xC106)
Tx: AA C1 06 <Address> <x> <y> <Line_Number> <D_x> <Dis_x> <M_y> <D_y> <Color> <Ymin>
<Ymax> CC 33 C3 3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<x>: The start of coordinate.
<y>: The zero coordinate (The lowest point); the actual position of connection point equals to
y-Ly or y+Ly.
<Line_Number>: The maximum number of lines is 40960 from 0x0000 to 0x9FFF. Every line
takes up 1 word unit.
<D_x>: The points' distance in read buffer from 0x01 to 0xFF; For example,
Address=Address+D_x after connecting one line.
<Dis_x> : The increment of X-axis from 0x01 to 0x0F; i.e. x=x+Dis_x after connecting one line.
<M_y> <D_y>: Amplification factor of Y-axis from 0x00 to 0xFF; and height equals to Y×M_y/D_y.
For example, M_y=4, D_y=2 means amplify Y-axis twice.
<Color>: Color of lines without changing any variation in system palette.
<Ymin>: The coordinate of the lower limit on Y-axis (The lower limit of window);
<Ymax>: The coordinate of the upper limit on Y-axis (The upper limit of window);
The line data format in temporary buffer is defined as Ly (2 bytes), as following direction:
Ly.15 is the connecting direction, 0=positive direction, 1=negative direction. Ly=0x8010 means
negative direction whose height is 16.
Ly.14- Ly.0 is connecting height.
3.18.9 Use Temporary Buffer as Pixel Buffer (0xC107)
Clear vacant pixel buffer:
Tx: AA C1 07 00 <Address> <X_Len> <Y_len> CC 33 C3 3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<X_Len>: The X-direction width of pixel buffer screen window (Pixel number), 0x0000-0x0FFFF.
<Y_len>: The Y-direction width of pixel buffer screen window (Pixel number), 0x0000-0x0FFF.
Note: The size of the RAM address is occupied by the pixel buffer= (X*Y)/16, Example build a 64*64
pixel buffer from temporary buffer address 0x0000. Then occupy the temporary buffer address space
is 0x0000-0x00FF.
Put pixel in pixel buffer:
Tx: AA C1 07 01 <Address> <X_Len> <Y_len> <Xs,Ys> <Color> <Mode> < (X0,Y0)… (Xi,Yi)> CC 33 C3
3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<X_Len>: The X-direction width of pixel buffer screen window (dots format), 0x0000-0x0FFFF.
<Y_len>: The Y-direction width of pixel buffer screen window (dots format), 0x0000-0x0FFF.
<Xs,Ys>: The coordinates of pixel buffer corresponding to the screen window.
<Color> is the color of pixel /delete point, not affect 0x40 command of the color palette.
< (X0,Y0)… (Xi,Yi)> are the coordinates of pixels. If cross border, then don’t put pixels. Display
actual coordinates in current page X=Xs+Xi Y=Ys+Yi
<Mode>: Mode of drawing pixel.
0x00=delete point in pixel buffer, 0x10=delete point in pixel buffer and current page
simultaneously.
0x01=put pixel in pixel buffer, 0x11=put pixel in pixel buffer and current page simultaneously.
Recover pixel buffer to current page:
Tx: AA C1 07 02 <Address> <X_Len> <Y_len> <Xs,Ys> <Color> CC 33 C3 3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<X_Len>: X-direction width of pixel buffer screen window (Pixel number), 0x0000-0x0FFFF.
<Y_len>: Y-direction width of pixel buffer screen window (Pixel number), 0x0000-0x0FFF.
<Xs,Ys>: The coordinates of pixel buffer corresponding to the screen window.
<Color>: Color of pixel, the same as current page displayed color.
Only put pixel in pixel buffer (01 mode). Users must clear pixel buffer before recover to current
page.
This command is mainly provided “layer” for users in order to achieve of the operation of some
pure color icon flexibly and expediently, such as the movement of cross cursor.
3.18.10 Display Multi-parameters with Temporary Buffer (0xC108)
Tx: AA C1 08 00 <Address> <Parameter_N> CC 33 C3 3C
Rx: None
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<Parameter_N>: The number of multi-parameters, 0x01-0xFF
Note: Display as right-aligned.
The parameters data of temporary buffer are defined as follows:
Temporary
Buffer
Definition Description
Relative
Address
0x00 Mode Mode.15:.12 The maximum integer digits number could be displayed;
Mode.11:.8 The maximum decimal digits number could be displayed.
0 means no decimal digital;
Mode.7 0=invalid integer bit zero is not displayed
1=invalid integer bit zero is displayed
Such as if the mode.15:.12=3, Mode.7=1, 0.3 will be displayed as 000.3.
Mode.6 0=text defines the background color with 0xC108
command
1=text automatically take the background color and
display. The coordinates are (X-1, Y) and the background is pure color.
Mode.5-Mode.4: Undefined and set to 0.
Mode.3-Mode.0: Display the size of font (Based on Lib_ID=0, default
ASCII font)
0=8*8
1=8*12
2=6*12
3=8*16
4=12*24
5=16*32
6=20*40
7=24*48
8=28*56
9=32*64
0x0A-0x0F undefined
0x01 X The starting coordinate of parameter display on X-axis
0x02 Y The starting coordinate of parameter display on Y-axis
0x03 F_Color The foreground color of parameter display, not-change palette setting
0x04 B_Color The background color of parameter display, not-change palette setting
0x05 Parameter Parameter data; 4 bytes, singed integer, Parameter.31 is the sign bit
The example of parameter setting
Mode
Display data Parameter (display font 16*32 dot matrix 6.3 mode, an invalid
integer bit 0 is not displayed)
12345 0x00 00 30 39 0x6005
123.450 0x00 01 E2 3A 0x6305
-123.450 0xFF FE 1D C6 0x6305
Example1:
AA C0 00 00 63 05 00 0A 00 0A F8 00 00 1F 00 01 E2 3A CC 33 C3 3C AA C1 08 00 00 01 CC 33 C3 3C
Display 123.450 at the starting coordinates (10, 10) as following:
AA C0 00 00 63 05 00 0A 00 0A F8 00 00 1F 00 01 E2 3A CC 33 C3 3C—Write temporary buffer
00 00: <Address>
63 05: From the above table, Mode: 0x6305
00 0A: X coordinate; 00 0A: Y coordinate (10,10)
F8 00: F_Color : The foreground color of parameter
00 1F: B_Color: The background color of parameter
00 01 E2 3A: From the above table, Parameter: 0x00 01 E2 3A
AA C1 08 00 00 01 CC 33 C3 3C—Display Multi-parameters with Temporary Buffer
00 00 01:<Parameter_N> : The number of multi-parameters
Example1: Two data is displayed on the one screen. The first data is 81.2; the second data is 7.3.
AA C0 00 00 61 44 00 0A 00 0A 00 00 FF FF 00 00 03 2C 61 44 01 AF 00 40 00 00 FF FF
00 00 00 49 CC 33 C3 3C AA C1 08 00 00 02 CC 33 C3 3C AA
This command is mainly used to solve the problem that many parameters are needed to refresh
and displayed simultaneously in order to avoid this case which. Parameters are not asynchronous
in the process of refreshing by the communication delay (particularly low baud rate).
3.19 Keyboard Operation Command (0x71, 0xE5)
3.19.1 Key Code Upload (0x71)
Tx: None
Rx: AA 71 <K_code> CC 33 C3 3C
<K_code>: Users preset key codes. Key code will be automatically uploaded with 5 keys per
second when the keyboard of UART LCM interface scans the pressing action.
3.19.2 Key Code Setting (0xE5)
Tx: AA E5 55 AA 5A A5 <K_Code0……K_Code63> CC 33 C3 3C
Rx: None
<K_Code0……K_Code63>: Key codes to be set. The number is fixed at 64. Only 16 key codes are
valid for 4x4 keyboard interface.
3.20 Read and Write in User's Memory (0x90, 0x91)
The physical media of database is NAND Flash with 100 thousand erasable times and 10 years life
circle.
3.20.1 Write in Random Data Memory (0x90 64KB)
Tx: AA 90 55 AA 5A A5 01 DE <Address> <Data0……Datai> CC 33 C3 3C
Rx: AA 90 4F 4B CC 33 C3 3C
<Address>: The starting address (Word address) of temporary buffer (RAM); totally 40k word,
from 0x0000 to 0x9FFF.
<Data0……Datai>: Data series to be written in form of bytes.
3.20.2 Write in Sequential Data Memory (0x90 30MB)
Tx: AA 90 55 AA 5A A5 <Address> <Data0……Datai> CC 33 C3 3C
Rx: AA 90 4F 4B CC 33 C3 3C
<Address>: The starting address (word address) of temporary buffer (RAM) is totally 40k word,
from 0x0000 to 0x9FFF.
<Data0……Datai>: Data series to be in form of bytes.
Different from random data memory, sequential data memory can only write sequentially. It
cannot write randomly.
The whole sequential memory is divided into 239 of 128KB data page. When encounter to the head
of page (address=* *******02 00 00), it will automatically erase the current page with no data
backup before erasing and will not affect other pages. It is recommended to do some continuous
data of large amount storage such as paperless recording and audio recording.
3.20.3 Read Data Memory (0x91)
Tx: AA 91 <Address> <Length> CC 33 C3 3C
Rx: AA 91 <Address> <Length> <Data0……Datai> CC 33 C3 3C
<Address>: The starting address to write in data memory has 4 bytes from 0x00000000 to
0x01DDFFFF.
The memory address of random data ranges from 0x01 DE 00 00 to 0x01 DE FF FF
<Length>: The length of data memory to read, 2 bytes. Most read 64KB once.
<Data0……Datai>: The read data strings in the form of bytes.
3.21 Download Font and Configuration File Command (0xF2)
Tx: AA F2 F2 F2 5A A5 <Lib_ID> CC 33 C3 3C
Rx: Please view Tx Text_Lib!
Then users can download corresponding word font.
After finishing saving font, UART LCM will response: ******One Text_Lib Saved OK! ******
<Lib_ID>: The storage position of font. A total of 60 fonts (0x00-0x3B), which 0x00-0x1F are 32
small fonts (configured files) in 128KB and 0x20-0x3B are 28 large fonts in 1MB.
Unless users need to design their own Chinese font, please do not modify font that located at
Lib_ID=0x00, 0x20, 0x21, 0x22 and0x23; otherwise, 0x53, 0x54, 0x55, 0x6E and 0x6F command will
wrongly display.
3.22 Simple Algorithm Command (0xB0)
3.22.1 Pinyin Input Method (0xB001、0xB004)
Tx: AA B0 01 <PY_Code> CC 33 C3 3C or AA B0 04 <PY_Code> CC 33 C3 3C
Rx: AA B0 01 <HZ_Num> <HZ_String> CC 33 C3 3C or AA B0 04 <HZ_Num> <HZ_String> CC 33 C3 3C
<PY_Code>: Chinese pinyin, capital display with maximum 6 bytes
<HZ_Num>: The number of Chinese character of pinyin. 0 represents the Pinyin is error. B001
specification is 1 byte, B004 specification is 2 bytes.
<HZ_String>: All Chinese characters of pinyin using internal code
0xB001 is for the first class of GB2312-80 first font. 0xB004 is for the GBK expansion font.
3.22.2 MAC Calculation (0xB002)
Tx: AA B0 02 <A, B, C, D> CC 33 C3 3C
Rx: AA B0 02 <E, F> CC 33 C3 3C
<A,B,C,D>: to calculate (A×B+C)/D while A,B,C and D are all unsigned integral of 2 bytes
<E,F> is the result of calculation. E is 4 bytes quotient and F is 2 bytes remainder
3.22.3 Array Sort (0xB003)
Tx: AA B0 03 <Pack0> CC 33 C3 3C
Rx: AA B0 03 <Pack1> CC 33 C3 3C
<Pack0>: Array to be sorted. Array data is 2 bytes
<Pack1>: Array after sorting, 2 bytes, ascending sort.
3.23 Buzzer Control Command (0x79)
Tx: AA 79 <Time> CC 33 C3 3C
Rx: None
<On _Time>: The time when turn on the buzzer , 0x01-0xEF. The unit is 10ms.
The specific time when turn on the buzzer.
3.24 Display and Read Clock Command (RTC) (0x9B, 0xE7)
3.24.1 Close clock display
Tx: AA 9B 00 CC 33 C3 3C
Rx: None
3.24.2 Open clock display
Tx: AA 9B FF <RTC_Mode> <Text_Mode> <Color> <X> <Y> CC 33 C3 3C
Rx: None
<RTC_Mode>: The clock mode
0x00:HH:MM:SS
0x01: 20YY-MM-DD HH:MM:SS
<Text_Mode>: The foreground type of clock
0x00: 8*8
0x01: 6*12
0x02: 8*16
0x03: 12*24
0x04: 16*32
0x05: 20*40
0x06: 24*48
0x07: 28*56
<Color>: The characters’ color
<X> <Y>: The coordinates of clock
3.24.3 Clock Setting
Tx: AA E7 55 AA 5A A5 <YY: MM: DD: HH: MM: SS> CC 33 C3 3C
Rx: None
<YY: MM: DD: HH: MM: SS>: Time format to be set as year:month:day:hour:minute:second, by
BCD code.
Example:
AA E7 55 AA 5A A5 08 11 28 12 57 00 CC 33 C3 3C
Set current time to 2008:11:28:12:57:00.
3.24.4 Read Current Time (The Gregorian calendar)
Tx: AA 9B 5A CC 33 C3 3C
Rx: AA 9B 5A <YY: MM: DD: WW: HH: MM: SS> CC 33 C3 3C
<YY:MM:DD:WW:HH:MM:SS>: The current clock data
Example:
08 12 25 04 09 58 00, represents 2008:12:25:Thursday:09:58:00.
If clock function is not supported by UART LCM, the unknown results will be returned.
3.24.5 Read Current Time (The Luna calendar)
Tx: AA 9B 5B CC 33 C3 3C
Rx: AA 9B 5B <YY:MM:DD:Chinese Zodiac:Heavenly stem: earthly branches> CC 33 C3 3C
<YY:MM:DD:Chinese Zodiac:Heavenly stem: earthly branches> is current Luna calendar,
including Chinese Zodiac, Heavenly stem, earthly branches, represented by internal code.
Example:
09 02 03 "niu yi chou", represents current lunar calendar Feb. 3rd, 2009, in which 2009 is "niu"
(Cattle) year and chronogram is "yichou"
If clock function is not supported by UART LCM, it will be returned unknown results.
3.25 Play Music Command (The hardware suppose is required in 0x30,
0x32, 0x33 commands)
These commands need corresponding hardware (DWIN DMA5601 stereo sound recording and
playing module) support.
3.25.1 Play specific position music (0x30)
Tx: AA 30 <Start_SEG> <SEG_Number> <Play_Time> CC 33 C3 3C
Rx: AA 3F 4F 4B start to play
AA 3F 4F 4B end playing
<Start_SEG>: The starting address of music segments to be played from 0x00 to 0xFF;
<SEG_Number> : The number of music segments to be played from 0x00 to 0xFF;
<Play_Time>: Replaying times from 0x00 to 0xFF.
3.25.2 Volume adjustment (0x32)
Tx: AA 32 <Volume_L > <Volume_R> 00 CC 33 C3 3C
Rx: AA 3F 4F 4B
<Volume_L>: The Volume of the left channel from 0x00 to 0x3F.
<Volume_R>: The Volume of the right channel from 0x00 to 0x3F.
3.25.3 Stop playing (0x33)
Tx: AA 33 55 AA 5A CC 33 C3 3C
Rx: AA 3F 4F 4B
Not only greatly reduce the amount of secondary development codes, but also reduce
the difficulty development by the configuration file to design the touching function
interface. More importantly, we hope to be able to change the design and marketing
ideas about our products.
Completely separate products' algorithm and design interface. Algorithm is the
core competitiveness of an enterprise. So the precious research and development
resources should not waste on a large amount of copious interface code designing.
Products research can process in parallel. Not only the interface designing and
algorithm can process in parallel, several graphic designers can design interface at the
same time. The key code of touching function has a function of "trigger message". So
engineers who are responsible for the different part of the algorithm can design and
debug algorithm in parallel.
Improve the reliability of products. In principle, all users' programmers lie in the
same parallel level. So the function modules are independent and easy for testing.
Easily upgrade. The upgrade of products are basically the upgrade of “interface”
while “algorithm” needs little after products are stable.(Our products are very stable. So
the upgrades of products are basically the upgrade of “interface” while “algorithm”
needs little.)
It is easy to achieve the interface of customization or style (Many skins), using the
configuration file method, because users only need to insert different interfaces in
configuration file. But the key code uploaded is the same.
Greatly shorten the developing time of new products which improve market
competitiveness. Develops a product for customers as follows:
a. Spend 1 to 3 working days to confirm basic demands with customers.
b. Spend 1 to 2 working days, our graphic designers can provide the product's interface based
on the standard UART LCM. Meanwhile our structure engineers are ready to provide product's
three-dimensional pictures for customers to confirm.
c. Our hardware engineers start to design the PCB after confirmation. The structure engineers
submit the drawings to factories in Shenzhen for fast molding. The graphic designers begin to modify
the interfaces and submit the process documents to software engineers.
d. One week later, we can submit a full-fledged prototype for inspection to customers.
Use the 0x99 command with the configuration file in order to easily address the following issues:
To analog dial, we can make different scales into icons and directly, expediently call it
according to the variables instead of viewing table again.
To special characters, we can call it in the way of icon, which eliminate character library
trouble even if the UNICODE encoding does not contained,.
It is convenient to use some interface “elements” of Windows, such as cursor, mouse
pointer and so on
.
Recommend to use the ICON command 0x97 for using the DWIN screen K600+ kernel customers.
3.27 Switching Between UART LCM and Video (0x74. The hardware
support is required)
For analog video playing:
Tx: AA 7A <Work_Mode> <Video_Mode> <Video_CH> CC 33 C3 3C
Rx: None
<Work_Mode>: 0x00=UART LCM 0x01=Video
<Video_Mode>: 0x00=PAL 0x01=NTSC
<Video_CH>: 0x00=CVBS input video signal, 0x01=S interface input video signal.
For digital video playing based on SD card:
Tx: AA 7A <Work_Mode> <KEY_VALUE> CC 33 C3 3C
Rx: None
<Work_Mode>: 0x00=UART LCM 0x01=Video
<KEY_VALUE>: in video broadcast mode, the function key value is defined as follows:
KEY_VALUE Function Key Value Description
0x00 lift
0x01 Play/pause press
0x02 Voice switch on
0x03 Voice switch off
0x04 Menu operation:Enter press
0x05 Menu operation:Backward press
0x06 Menu operation:Forward press
0x07 Menu operation:Esc press
0x08 Menu operation:volume up press
0x09 Menu operation:volume down press
0x0A Menu operation:Chinese/English select press
(Page1)
(Page1)
CPU GPU TFT display
screen
For the intrinsic software above version V5.5 of K600, H600, K600+ kernel the dual-memory
structure has been applied in order to avoid the following problems:
It will cause flickering or jittering when using the background restoration (Such as 0x71 + 0x98
commands to display text without background color).
When the large numbers of parameters are displayed on a page, it will cause asynchrony display
(The lower the baud rate is, the more obvious the problem will be).
When using the dual-memory structure, the interface that users can see is main memory (Page
0), while the interface of instruction operation is vice memory (Page 1). The CPU timing (100ms) can
refresh the display content from vice memory to main memory in 100ms in order to synchronously
display. But there are two exceptions:
a. CPU will automatically and immediately refresh the display content from vice memory to
main memory after displaying pictures w the 0x70 command.
b. When CPU is processing the command, which relates to display, it will automatically delay the
refresh cycle extended to 30ms even if it’s time to display. If the display commands are not received
any more after 30ms, it will be refreshed and displayed.
It will immediately refresh content from vice memory to main memory when the function of 0xD0
command is regardless of refresh on time,.
Recommend that new customers select “0xD0 command not auto-execution mode” and send the
0xD0 command to display once after completing the process. You can get very good synchronous
display results and achieve the jitter-free display.
Refresh mode configuration table (PARA2 parameters specification please refer to 0xE0 command)
PARA2 PARA2.7
mode
.2
Automatically execute 0xD0 command to refresh in every 30ms 1 0
Automatically execute 0xD0 command to refresh in every 200ms 1 1
The 0xD0 command does not executed automatically except that 0x70 and 0 Any value
touching function refresh. Only refresh when users are sending the 0xD0
command.
3.29 Input Parameters or Text with Touch Screen Command (0x7C, H600
and K600+ only)
Touch screen input parameters. The following conditions must be met:
1. Use the 0x1E touching function configuration file.
2. Low byte key code must be valid and in accordance with the following specifications:
Key code (Hex mode) Definition Description
0xF0 ESC Exit
0xF1 Enter Confirm
0xF2 BackSpace Backspace
0xF3 Page_up Pageup
0xF4 Page_down Pagedown
Caps lock, limited only A-Z (a-z), the button is highlighted
if effective.
If preset key code is A-Z: after clicking CapsLock will be
a-z;
0xF5 CapsLock
If the preset key code a-z: after clicking CapsLock will be
A-Z。
If use this button, you cannot design animation in
configuration file.
0xFD Return return
3. The background of textbox which used to input display must be a solid color.
4. DWIN_PY_GBK_01.BIN must be placed in the 0x01 font the DWIN GBK input lexicon
(DWIN_PY_01.BIN) when Chinese input.
3.29.1 Input Pure ASCII String (0x7C01)
Tx: AA 7C 01 <R_ID> <VP_ID> X Y <Str_Max_Num> < Str_Scale> < Str_Color > <[Init_V]> CC 33 C3 3C
Rx: AA 7C 01 <R_ID> <Str_Number> <String> CC 33 C3 3C
<R_ID>: A two-byte returned default value (0x0000-0xFFFF), which is used by user software for
returned parameter identification
<VP_ID>: The virtual page number used for input method, VP_ID=0xFFFF represents by the
current page.
<X, Y>: The left-up positon of input text display area. Since the text display background color is
read from address (X, Y), the actual display address is start at from (X+1, Y), by the right alignment
displayed format.
<Str_Max_Num>: The maximum length of input string, 0x01-0x40, up to 64 ASCII characters.
< Str_Scale>: The display format of input string.
<Str_Scale.7>: 0=Display characters normally; 1=Display text masked with “*”, by display of
input password and so on.
<Str_Scale.6>: 0=input no initial value; 1=the input initial value.
<Str_Scale.5-.4>: Reservation and set to 0.
<Str_Scale.3-.0>: Size of input text, 0x00-0x07, up to 8 fonts.
Str_Scale 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
Font size 8*8 6*12 8*16 12*24 16*32 20*40 24*48 28*56
< Str_Color >: The display color of input string by 65K color mode.
<[Init_V]>: The Initial value in ASCII encoding. To set this value, <Str_Scale.6> have to be set to 1.
<Str_Number>: The number of actually returned ASCII characters, 0x00 represents null value.
<String>: The returned ASCII.
End of return conditions: ESC (0xF0, return null), Enter (0xF1) and Return (0xFD)
If the virtual page is not current page, then the button animation effect cannot be set.
Parameter
Range Description
register name
Depends on The DWIN screen driver mode selection, users don not configure
R0
DWIN screen it
R1 0x00-0x11 Set baud rate, 0x00-0x10 corresponds to 1200bps-921600bps
R2 0x00-0xFF 0xE0 command of PARA1
R3 0x00-0xFF 0xE0 command of PARA2
K600+ kernel only. When R1=0x11, baud rate configures the
high bit of a word.
R5 Uncertain R5:R9=6250000/users can define the baud rate.
e.g.: set 10000bps baud rate,
R5:R9=6250000/10000=625=0x0271 R5=02 R9=71
After starting the backlight with touch screen control, click on
R6 0x00-0x40
the touch screen, the backlight light brightness
After starting the backlight with touch screen control, a period
R7 0x00-0x40 of time do not click on the touch screen, the backlight light
brightness
After starting the backlight with touch screen control, the time
R8 0x01-0xFF
of touch screen backlight lit, unit is 0.5 seconds
K600+ kernel only. When R1=0x11, baud rate configures the low
R9 Uncertain
bit of a word.
The parameter of configuration file is one byte Hex mode, such as 0A represents decimal 10; the
parameter of configuration file must be 2 bits, such as 00 cannot be written as 0.
The typical configuration file
R1=07 ; baud rate, 07=115200bps
R2=30 ; PARA1, 30=enable touching function, the backlight brightness switch is controlled with
clicking touch screen
R6=40 ; on the touch screen backlight automatically control mode, the brightness of backlight
lit, 40=100% brightness (the brightest)
R7=10 ; on the touch screen backlight automatically control mode, the brightness of backlight
turns off, 10=25% brightness
R8=14 ; The time of backlight, the unit is 0.5 seconds. 14=10 seconds
//Application example 1: The main program query the state of touch screen
if(RXFRMOK) // Check it whether the UART LCM data is received in foreground
//main program
{ if(RXBUF[0]==0x78) //Touching function button
{}
if(RXBUF[0]==0x7C) //Touch screen Pinyin input is end
{}
RXFRMOK=0; //Finish and clear messages
}
//Application example 2:Power is on and query whether the serial port screen is ready
void acklcd() // Send the 0x00 handshake command check whether LCD is ready, or waiting
//LCD ready when power on
{ RXFRMOK=0;
while(RXFRMOK==0)
{ txword(0xaa00);
txeof();
delay10ms(10);}
RXFRMOK=0;}
7 Revision History
Revise Contents Kernel Document
Date Version Version
2008.12.01 First Publish. -- Ver1.0
Revise specifications of configuration files and add specifications
2008.12.09 -- Ver1.1
about keyboard interface.
2008.12.11 Add several special fonts in 0x98 command -- Ver1.1
Add the 0xC104 command. Revise the 0xC103 command and
2008.12.15 -- Ver1.1
add the function of amplifying Y-axis in scale.
Unify command set of T and S serials. Add the 0x9B command to
2008.12.25 -- Ver1.2
read clock.
Add the command 0x5E to the backlight of touching function or
2009.01.19 keyboard control function. Add the command 0xE0 to the -- Ver1.3
definition of PARA1.4 which controls to open backlight.
2009.02.02 Add the 0x98 command on the lunar calendar support -- Ver1.3
Add 0x1A configuration file which supports command to
2009.02.12 -- Ver1.3
combination commands in touchpad operation.
2009.03.13 Add the 0x64 command (Area filling). -- Ver1.4
2009.04.07 Add the 0x5704 command (Display arc). -- Ver1.4
Add the 0x9C command to achieve transparent icon overlay of a
solid color background.
2009.06.29 -- Ver1.5
Add the 0xC106 command to supplement the 0xC105 command:
Positive and negative two-way curves; window’s limitation.
Modify the 0x9A and 0x1C commands configuration file
specification. The M600 products can be automatically looped
2009.07.16 -- Ver1.5
the command set at fixed time in order to design animation
easily
Revise the definitions of the configuration file of 0x1A and 0x1E.
2009.07.23 -- Ver1.5
So the user commands extended to 1024.
Add the 0xC110 command, added the function of controlling the
2009.08.07 -- Ver1.5
buzzer by touching or software.
Modify 0x79, 0xE0 command, added the buzzer control and
2009.08.08 -- Ver1.6
buzzer software control.
Add the 0x7A to switch the UART LCM model and the video
2009.09.03 -- Ver1.6
model.
Add the 0xC2 command back and forth to read data of
2009.09.17 temporary buffer in order to provide the RAM function of the -- Ver1.6
use RMA.
Add the 0x7B command to verify the users’ pictures to ensure a
2009.12.27 -- Ver1.6
successful download.
K600 kernel production; because of kernel modification, modify
0xE0 command <TFT_ID> corresponds to the product list;
2010.01.04 Ver4.5 Ver1.7
modify 3 calibration point position of the touch screen
calibration detective (0xE4).
Add the 0x98 command to the definition of C_Mode.5 in order
2010.02.21 Ver4.5 Ver1.7
to support the text vertical wrap.
For 128MB version of the UART LCM kernel, upgrade Ver5.0 or later UART LCM software needs to
download fonts and pictures again!
2010.03.06 Add the upload ID of the currently displayed pictures in the Ver5.0 Ver1.8