1 Curve Display 1 Data Frame Data 1 2 3 4 5 Definition Frame Header Data Length Command Data CRC checksum of the command and data Data Length 2 1 1 N 2 Defined by R3 & Data length, include Description RA in command, data and CONFIG.TXT checksum Data frame is made up by 4 parts, shown as below. 0x80-0x84 Defined by R2 in CONFIG.TXT 2 Command Set Function CMD Data Description 0x80 ADR(0x00-0xFF)+Data_Pack Write data into the specified register Access Register 0x81 ADR(0x00-0xFF)+RD_LEN(0x00-0xFF) ADR(0x00-0xFF)+RD_LEN+Data_Pack Read data from the specified register Response from the DGUS module Access Variable SRAM 0x82 0x83 ADR_H:L(0x0000-0x6FFF)+Data0...DataN ADR_H:L(0x0000-0x6FFF)+RD_LEN(0x00-0x7F) Write data into the specified variable SRAM Read data from the specified variable SRAM ADR_H:L+RD_LEN+Data0...DataN Response from the DGUS module Trend Curve 0x84 CH_Mode(Byte)+Data0(Word)+...+DataN Write data into trend curve buffer. Buffer 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.
2 3 Curve Display There are two methods to display the curve: Dynamic-curve Display Basic Graphic Display 3.1 Dynamic-curve Display 3.1.1 Display Dynamic-curve in the different areas Add the dynamic-curve display functions in the different areas. The data source channels should be different. You can display up to 8 dynamic-curves at the same time. Display in the different areas simultaneously
3 3.1.2 Display Dynamic-curve in the same areas Add the dynamic-curve display functions in the same areas. The data source channels should be different. You can display up to 8 dynamic-curves at the same time. Display the curve in the same area
4 3.1.3 Send Curve Data to the Data Source Channel Send: 5A A5 12 84 12 00 32 00 72 00 9F 00 04 00 17 00 36 00 93 00 1A Description: 5A A5 : Frame header. 12: Data length from 84 to 1A 84: Command for Writing Curve 12: Channel 4 & Channel 1, 8bit(0001 0010) 00 32 : Data in channel 1 00 72 : Data in channel 4 3.1.4 Reset Dynamic-curve Step 1: Update the kernel to DGUS_V5.5 or above Please contact our sales to get the latest firmware. For steps on update refer to the chapter 1.4 of DGUS Development Guide. Step 2: Write commands to DGUS register to clear the curves. Register Address Definition Length(Byte) Description 0xEB Trendline_Clear 1 Write a special value to clear the data of corresponding channels. 0x55: Clear the whole dynamic curve data buffer. 0x56-0x5D: Clear the data of channels respectively from CH0 to CH7. After clearing the dynamic curves, this register will be reset. For example, Clear all channels 5A A5 03 80 EB 55 5A A5 : Frame header. 03: Data length from 80 to 55 80: Command for writing data into DGUS register EB: Register Address 55: The special value for clearing the whole dynamic curve data buffer Clear the special curve 5A A5 03 80 EB 5A 5A A5 : Frame header. 03: Data length from 80 to 5A 80: Command for writing data into DGUS register EB: Register Address 5A: The special value for clearing the data of channel 4.
5 3.2 Basic Graphic Display String Format Address Definition Description VP CMD Command. VP+1 VP+2 Date Pack For Basic Graphic CMD 0x0001 0x0002 0x0003 0x0004 0x0005 0x0006 0x**07 0x0008 0x0009 Function Dot Line Rectangle Rectangle Area Fill Circle Picture Cut/Paste Icon Display Area Fill Vertical Line Data_Pack_Num_Max DATA_Pack Relative Address Data Length Max number of data packs. For command 0x0002, it s number of graph. Definition Description of Data Format, by word 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. 0x00 1 Pic_ID Image ID of cutting area. Description 0x01 2 (x, y)s Coordinate of top-left of cutting area. 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 0x01 1 X0 0x02 1 Y0s 0x03 1 Y0e 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.
6 0xFE This operation will be skipped (ignored). 3.2.1 Curves with Different Color 1) Add the basic graphic display areas via DGUS_SDK software. As follow, add 2 basic graphics areas with different VP(0x0000 & 0x1000) 2) Send commands via serial port Send: 5A A5 1B 82 00 00 00 02 00 03 F8 00 00 58 01 8F 00 DB 00 93 01 62 02 95 02 0E 00 AB FF 00 ------ Line 1, VP=0x0000 5A A5 ---- Frame header 10---- Data length from 82 to 93 82 ---- Command for writing data into the VP 00 00 ---- VP 00 02 ---- Draw line command 00 03 ---- Number of line, equal to dots -1. F8 00 ---- Color of line 00 58 01 8F ---- Coordinate of dot 0 00 DB 01 C0 ---- Coordinate of dot 1 01 62 02 95 ---- Coordinate of dot 2 02 0E 00 AB ---- Coordinate of dot 3 FF 00 ----- End mark 5A A5 1B 82 10 00 00 02 00 03 00 1F 00 37 00 8F 00 1B 00 23 00 32 01 25 01 41 00 17 FF 00------ Line 2,
7 VP=0x1000 3.2.1 Curves with Same color 1) Add a basic graphic display areas via DGUS_SDK software, VP=0x0000. 2) Send commands via serial port A5 5A 13 82 0000 0002 000A F800 0001 0002 0015 0018 FF00 ------ Line 1, save data from 0x0002 to 0x0016 in VP=0x0000 A5 5A 09 82 0007 0010 0025 FF00 ---- Line 2, VP starts from 0x0007 A5 5A 09 82 0009 0011 0030 FF00 ---- Line 3, VP starts from 0x0009 A5 5A 0D 82 000B 0013 0034 0015 0036 FF00 3) Modify some dot ( For example, the first dot's address is 0003) A5 5A 07 82 0003 0001 0002 ----- Modify the first dot A5 5A 07 82 0005 0015 0018 ----- Modify the second dot
8 3.2.3 Reset Curve Send: 5A A5 10 82 00 00 00 02 00 00 F8 00 00 58 01 8F 00 DB 00 93 01 62 02 95 02 0E 00 AB Set Data Pack Num. Max to 0.