buydisplay.com
EastRising
4.1.2
Command Parameter Setting [USERCMD]
The other part of the command file is the command setting [USERCMD]. The serial command
as mentioned in sector 4.2 is expressed in the way of text, for example:
80h #00:
0, 0, 10, 20
// display P0 at (10, 20)
It is designed to display the picture No. 0 at (10, 20). Once the far end MCU send Start(1Byte)
+
80h
+
00
+ CRC(2Bytes) + End(4Bytes), then picture 0 will be displayed immediately at (10,
20), which is the top left corner of picture 1 will be at (10, 20).
80h #01:
1, 0, 50, 30,
2, 1, 50, 150
// display P1 at (50, 30) ;display P2 at (50, 150)
The above example is designed to display the No. 1 picture at (50, 30), and the No.2 picture
at (50, 150), that is, once the far end MCU sends tart(1Byte) +
80h
+
01
+ CRC(2Bytes) +
End(4Bytes), then the picture 1 will be displayed at (50, 30) immediately, and picture 2 will be
displayed at (50, 150) immediately in PNG form. For example:
88h #00:
1, 20, 180, GIF0, 0
// display GIF 0 animation at (20, 180)
The above example is designed to display the GIF 0 at (20, 180) with a speed of 1. Once the
far end MCU sends Start(1Byte) +
88h
+
00
+ CRC(2Bytes) + End(4Bytes), then GIF 0 will be
displayed at (20, 180)
C0h #00:
1, 0, 10, 200, 0xFF5500, 0xEE3355, 1, 1, 0, 1
C0h #01:
1, 0, 100, 200, 0x335500, 0x883355, 1, 1, 0, 1
The above example is design too display two strings. Once the far end MCU send “Start(1Byte)
+
C0h
+
00
+“
电子有限公司
-ER-TFT028A2-4-5465
”+ CRC(2Bytes) + End(4Bytes)”, TFT panel will
display “
电子有限公司
-ER-TFT028A2-4-5465
” at (0, 10) in font 1, with foreground color
0xFF5500, background color 0xEE3355, non-magnified, opaque mode.
Once MCU send “Start(1Byte) +
C0h
+
01
+ “
工业串口屏
” + CRC(2Bytes) + End(4Bytes)”. TFT
panel will display “
工 业 串 口 屏
”
at position (100,100) in front1, with foreground color
0x335500, background color 0x88335, non-magnified, opaque mode. The instruction content
“
200”
is the width of text window.