JUTF70 User Guide
v1.0 Intelligent Serial 7” TFT-LCD Module
Copyrights® 2016 T&1 Inc. All Rights Reserved
Rev. 1.0 Initial Release on 2016-06-13
JUTF70 User Guide v1.0
P a g e 1 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
REVISION HISTORY
DATE DOC. REVISION CHANGES
2015-06-13 V 1.0 INITIAL RELEASE
JUTF70 User Guide v1.0
P a g e 2 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
TABLE OF CONTENTS
HW
1 SYSTEM FEATURES 6
H/W SUMMARY 6
FEATURES 6
2 JUTF70 CONNECTORS 7
3 CONNECTOR INFORMATION 8
J1: I2C(TWI) 8
J3: POWER(5V) 8
J4: UART TO RS232 8
J5: SD CARD 8
J6: UART(TTL) 8
J7: GPIO 9
J8: SPEAKER 9
CON1: USB 9
CON4: UART TO USB(DEBUG) 9
4 DIMENSION 10
JUTF70 User Guide v1.0
P a g e 3 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
SW
5 BOOTING ENVIRONMENT 11
5.1 BOOTING ENVIRONMENT SETUP 11
5.1.1 NORMAL MODE 11
5.1.2 USB MASS STORAGE MODE 11
5.1.3 FIRMWARE UPDATE MODE 12
5.2 SPLASH IMAGE SETUP 12
6 HOST INTERFACE 13
6.1 SERIAL PORT CONFIGURATION 13
6.2 UART BAUDRATE SETUP 13
7 IMAGE FORMAT 14
8 SYSTEM COMMAND 15
8.1 CONNECT CHECK – “S,0” (0X73, 0X30) 15
8.2 DOUBLE BUFFER MODE – “S,3” (0X73, 0X33) 16
8.3 SINGLE BUFFER MODE – “S,4” (0X73, 0X34) 16
8.4 LCD BRIGHTNESS – “S,5” (0X73, 0X35) 17
8.5 SCREEN FLIP – “S,6” (0X73, 0X36) 17
8.6 USB MASS STORAGE DEVICE – “S,7” (0X73, 0X37) 18
8.7 SYSTEM RESET – “S,9” (0X73, 0X39) 18
JUTF70 User Guide v1.0
P a g e 4 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
9 PRIMITIVE COMMAND 19
9.1 SET COLOR – “L,0” (0X6C, 0X30) 19
9.2 DRAW LINE – “L,1” (0X6C, 0X31) 19
9.3 DRAW RECTANGLE – “L,2” (0X6C, 0X32) 20
9.4 DRAW GRADIENT RECTANGLE – “L,3” (0X6C, 0X33) 20
9.5 DRAW ROUNDED RECTANGLE – “L,4” (0X6C, 0X34) 21
9.6 DRAW THICK LINE – “L,5” (0X6C, 0X35) 21
9.7 DRAW CIRCLE – “L,6” (0X6C, 0X36) 22
9.8 DRAW ELLIPSE – “L,7” (0X6C, 0X37) 22
10 IMAGE COMMAND 23
10.1 IMAGE LOAD – “I,1” (0X69, 0X31)
23
10.2 DRAW IMAGE – “I,2” (0X69, 0X32) 23
10.3 DRAW IMAGE RECTANGLE – “I,3” (0X69, 0X33) 24
10.4 DRAW IMAGE SCALE – “I,4” (0X69, 0X34) 25
10.5 DRAW IMAGE SCALE RECTANGLE – “I,5” (0X69, 0X35) 25
10.6 IMAGE RELEASE– “I,6” (0X69, 0X36) 26
11 TEXT-OUT COMMAND 27
11.1 TEXT OUT – “F,0” (0X66,0X30) 27
11.2 TEXT COLOR – “F,1” (0X66,0X31) 27
12 TOUCH INPUT 28
12.1 TOUCH INPUT PACKET 28
13 SCRIPT COMMAND 29
13.1 RUN SCRIPT – “C,0” (0X74,0X30) 29
JUTF70 User Guide v1.0
P a g e 5 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
14 IMAGE COMMAND 30
14.1 SOUND LOAD – “W,1” (0X77, 0X31) 30
14.2 SOUND PLAY – “W,2” (0X77, 0X32) 30
14.3 SOUND STOP – “W,3” (0X77, 0X33) 31
14.4 SOUND VOLUME – “W,4” (0X77, 0X34) 31
14.5 SPEAKER ON/OFF – “W,5” (0X77, 0X35) 32
14.6 SOUND RELEASE– “W,6” (0X69, 0X36) 32
JUTF70 User Guide v1.0
P a g e 6 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
1. System Features
JUTF70 is an intelligent serial 7” TFT-LCD module, which can help the legacy MCU (such as 8051, PIC, AVR and Cortex-M) systems deploy TFT-LCD for more intuitive GUI(Graphical User Interface) and better UX(User Experience) easier and faster. Medical device/equipment, industrial gadget/facility and Open source HW (such as Arduino) systems can easily and quickly deploy TFT-LCD to implement GUI for the compelling UX upgrade.
1.1 H/W Summary
TFT-LCD: 7” size (Resolution 800x480), 24bit RGB Color - Backlight: PWM Control - Touch Input: Resistive Touch - 4wire
MCU Speed: 100MHz - 16Mbyte Internal SDRAM - 512K Internal Flash Memory
Memory: NAND 128Mbyte Debug UART 1CH: UART to USB User Interface
- I2C(TWI) - UART 1CH: TTL - UART 1CH: UART to RS232 - 2 GPIOs
USB Device 1CH: v2.0 Full Speed(12Mbps), recognized as a mass storage device Input Power: DC 5V / Min. 1A
1.2 Features
TFT-LCD control through UART
- Baud rate: ~115200 bps(configurable)
- Data bit: 8
- Stop bit: 1
- Parity bit: None
- TTL Image control through UART command
- Image drawing
- Zoom in/Zoom out/Rotation LCD Backlight Control - PWM Comprehensive image files management through USB mass-storage device Touch coordination output Supported image file format: BMP, JPG, PNG, TGA, SUF(RGB888, RGB565)
JUTF70 User Guide v1.0
P a g e 7 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
2. JUTF70 Connectors
CON4: UART to
USB(Debug)
J8: Speaker
J5: SD card
CON3: Touch CON2: LCD
J1: I2C
J6: UART2
J7: GPIO
J4: UART to
RS232
J3: Power
CON1: USB
J2: JTAG SW
JP1: JTAG
WiFi(Option)
JUTF70 User Guide v1.0
P a g e 8 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
3. Connector Information
J1: I2C(TWI)
Pin No. Function I/O Pin No. Function I/O
1 SCL(P4.4) B 3 SDA(P4.5) B
2 GND P 4 GND P
J2: JTAG Select Switch
Pin No. Function I/O Pin No. Function I/O
1 JTAG SW B 2 GND P
J3: Input Power(DC 5V)
Pin No. Function I/O Pin No. Function I/O
1 +5.0V P 2 GND P
J4: UART to RS232
Pin No. Function I/O Pin No. Function I/O
1 RTS I 4 RS232 TXD O
2 CTS O 5 GND P
3 RS232 RXD I 6 GND P
J5: SD Card
Pin No. Function I/O Pin No. Function I/O
1 D2 B 6 VSS P
2 D3 B 7 D0 B
3 CMD B 8 D1 B
4 VCC P 9 COL B
5 CLK B
J6: UART(Target Micom I/F)
Pin No. Function I/O Pin No. Function I/O
1 RX1 B 3 TX1 B
2 GND P 4 GND P
J7: GPIO
Pin No. Function I/O Pin No. Function I/O
JUTF70 User Guide v1.0
P a g e 9 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
1 P4.0 B 3 P4.1 B
2 GND P
J8: Speaker
Pin No. Function I/O Pin No. Function I/O
1 SPK N(-) O 2 SPK P(+) O
CON1: USB(PC I/F - Mass Storage )
Pin No. Function I/O Pin No. Function I/O
1 Vcc(+5V) P 4 NC
2 D- B 5 GND P
3 D+ B
CON4: UART to USB
Pin NUM Function I/O Pin NUM Function I/O
1 Vcc(+5V) P 4 NC
2 D- B 5 GND P
3 D+ B
*I/O Pin Definition
B Bus(Data/Control)
I Input
O Output
P Power
JUTF70 User Guide v1.0
P a g e 10 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
4. Dimension
JUTF70 User Guide v1.0
P a g e 11 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
5. Booting Environment
5.1 Booting Environment Setup
JUTF70 has 3 Booting Modes;
1. Normal Mode, 2. USB Mass Storage Mode, 3. Firmware Update Mode
Booting mode can be chosen by configuring the dip switch, SW1 on JUFT70. Prior to power-on, the booting mode must be chosen by the appropriate SW1 configuration.
5.1.1 Normal Mode This is a common and normal serial port communication control mode. During the booting stage, JUFT70 checks whether ‘config.txt’ file exists or not in NAND
memory’s root directory. If ‘config.txt’ existed, JUFT70 configures the operating environment in accordance with ‘config.txt’ and waits for external input. The format of ‘config.txt’, the operating environment configuration file, is as following;
KEYWORD = VALUE Supported KEYWORD as follows;
KEYWORD VALUE
Baudrate 9600, 19200, 38400, 57600, 115200
Packetdebug Helps to check Host’s commands by output Host’s commands to debug channel.
For example, to adjust UART Baudrate to 115.2kbps, it should be written as following;
Baudrate = 115200
Head-up: There must be one KEYWORD and one VALUE per line!
5.1.2 USB Mass Storage Mode JUFT70’s NAND memory works as an USB mass storage device in this mode.
When connected with PC through USB cable, JUFT70 is recognized as an USB mass storage device and PC can do file management such as copy, delete, save and paste.
- When formatting JUFT70’s NAND memory, must use FAT16 or FAT32
- Also can enter this mode by using System Command (Refer to ‘8. System Command’)
- Whenever NAND memory content changes/updates, it must be rebooted to reflect the
changes/updates.
JUTF70 User Guide v1.0
P a g e 12 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
5.1.3 Firmware Update Mode If new version of firmware file (“_update_.bin”) is found in NAND memory, JUFT70 updates
and/or upgrades its internal system firmware and reboots. After update/upgrade the firmware, the firmware file(“_update_.bin”) is removed
automatically.
5.2 Splash Image Setup The displaying image during booting stage is “boot.bmp”, or “boot.png” if no “boot.bmp”
exists. JUFT70 looks over “boot.bmp” in NAND memory and then “boot.png” if “boot.bmp” is missing or corrupted.
JUTF70 User Guide v1.0
P a g e 13 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
6. Host Interface
6.1 Serial Port Configuration
Default serial port configuration 115200 bps , Data bit 8bits , No parity, 1 stop bit, flow control-none
6.2 UART Baudrate Setup
After booting as a USB mass-storage device and modifying ‘config.txt’ file in JUFT70’s NAND memory, you can change JUFT70’s UART baudrate. Search “baudrate” item in ‘config.txt’ file and modify its value as you want. If ‘config.txt’ file is not found or no “baudrate” item, you need to create new ‘config.txt’ file and/or insert “baudrate” item with your own preferred value. Example
baudrate=115200
After modifying UART baudrate with new value, you must reboot JUFT70 to apply this new UART baudrate setup.
JUTF70 User Guide v1.0
P a g e 14 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
7. Image Format
JUTF70 supports the following image formats;
BMP (24, 8bpp), JPG , PNG, TGA Also refer to the following Image Output Time per Image Draw command.
Image Size 800 x 480 64 x 64 (w/out transparent alpha channel)
64 x 64 (w/ transparent alpha channel)
Output Time 30 msec 3 msec 4 msec
JUTF70 User Guide v1.0
P a g e 15 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
8. System Command
Command packet format comprises as the following;.
Start of Packet(‘$’) Command Body End of Packet( ‘#’)
- Start of Packet (=SOP) is ASCII code ‘$’(0x24) and indicates the beginning of command. - End of Packet (=EOP) is ASCII code ‘#’(0x23) and indicates the end of command. - Command Body comprises of 2byte command and argument(s).
Example> Command (2bytes) , ARG0 , ARG1 , ARG2 , …, ARGn Arguments must be written in string format.
For example, to run ‘line draw’ from starting point of 100, 100 to end point of 200, 200, you must specify the argument as “100, 100, 200, 200” in string format.
The following is one of examples for host program.
void draw_line(int x, int y, int endx, int endy) { printf(“$l1, %d, %d, %d, %d#”, x, y, endx, endy); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART OK; else ERROR; }
8.1 Connect Check – “s,0” (0x73, 0x30)
You can check the JUFT70’s connection status with this command. If no response for this command, JUFT70 is not connected with your target host system. Response( HOST )
Return ‘+’ if success, otherwise ‘-‘ Argument
None Example
printf(“$s, 0#”); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 16 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
8.2 Double Buffer Mode – “s,3” (0x73, 0x33)
This command configures Draw Mode in Double Buffer Mode. After this command executes, all LCD draw commands apply to the back frame buffer and the back frame buffer contents can be displayed to LCD by using ‘flip’ command, which swaps the front frame buffer and the back frame buffer. In the single buffer mode, the displaying contents may show its being updated status when the contents get changed and/or updated while double buffer mode shows the displaying contents only after the contents get fully updated and refreshed.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument None Example
printf(“$s, 3#”);//UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
8.3 Single Buffer Mode – “s,4” (0x73, 0x34)
After this command executes, all LCD draw commands apply to the front frame buffer and LCD displays its contents immediately. However, LCD may show its being displayed status when handling big image file.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument None Example
printf(“$s, 4#”);//UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 17 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
8.4 LCD Brightness – “s,5” (0x73, 0x35)
This command controls LCD backlight intensity. 0 is for the minimum and 99 is for the maximum LCD brightness.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d: value value : 0 ~ 99
Example
printf(“$s, 5, %d#”, value); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
8.5 Screen Flip – “s,6” (0x73, 0x36) When configured as Double Buffer Mode, this command swaps the front frame buffer and the back frame buffer. That is, LCD displays the back frame buffer contents.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument None Example
printf(“$s, 6#”); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 18 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
8.6 USB Mass Storage Device – “s,7” (0x73, 0x37)
This command configures JUTF70 as an USB mass storage device. After this command executes, JUFT70 is recognized as an USB mass storage device by PC
and PC can manage the files on JUFT70’s NAND memory. After the files are changed and/or updated, JUFT70 must be rebooted to reflect the changes and/or the updates.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument None Example
printf(“$s, 7#”); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
8.7 System Reset – “s,9” (0x73, 0x39)
Reset and reboot JUTF70. After NAND memory contents get changed/updated, JUFT70 must be reset and rebooted.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument None Example
printf(“$s, 9#”); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 19 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
9. Primitive Command
9.1 Set Color – “l,0” (0x6c, 0x30)
This command set up the RGB color for Draw commands (i.e. ‘Draw Line’).
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d : red, green, blue red, green, blue : range of 0~255
Example
printf(“$l, 0, %d, %d, %d#”, red, green, blue); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
9.2 Draw Line – “l,1” (0x6c, 0x31)
This commands draw the line as implied.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d : x, y, endx, endy
x , y : start point endx, endy : end point
Example
printf(“$l, 1, %d, %d, %d, %d#”, x, y, endx, endy); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 20 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
9.3 Draw Rectangle – “l,2” (0x6c, 0x32)
Draws a rectangle as implied.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d, %d : x, y, w, h, fill x, y : start point
w : width h : height fill >=1 -> filled with pre-configured color, 0 -> unfilled
Example
printf(“$l, 2, %d, %d, %d, %d, %d#”,x ,y, w, h, fill==0?0:1); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
9.4 Draw Gradient Rectangle – “l,3” (0x6c, 0x33)
Draws a gradient rectangle as implied.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d, %d, %d, %d, %d, %d, %d : x, y, w, h, sr, sg, sb, er, eg, eb x, y : start point w : width h : height sr, sg, sb : start(initial) RGB value : 0~255 er, eg, eb : end(last) RGB value : 0~255 Example
printf(“$l,3,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d#” ,x ,y ,w ,h ,sr ,sg ,sb ,er, eg, eb); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 21 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
9.5 Draw Rounded Rectangle – “l,4” (0x6c, 0x34)
Draws a rounded rectangle as implied.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d, %d, %d, %d : x, y, w, h, rad, fill x,y : start point w : width h : height rad : radius at edge point
fill >=1 -> filled with pre-configured color, 0 -> unfilled Example
printf(“$l,4,%d,%d,%d,%d,%d,%d#” ,x ,y ,w ,h ,rad ,fill==0?0:1); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
9.6 Draw Thick Line – “l,5” (0x6c, 0x35)
Draws a thick line as implied.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d,%d,%d,%d,%d : x, y, endx, endy, thick x, y : start point endx, endy : end point thick : line thickness Example
printf(“$l,5,%d,%d,%d,%d,%d#”,x ,y ,endx ,endy, thick); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 22 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
9.7 Draw Circle – “l,6” (0x6c, 0x36)
Draws a circle as implied.
Response( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d : x, y, r, fill x, y : Circle’s center point r : Circle’s radius
fill >=1 -> Filled with pre-configured color, 0 -> unfilled
Example
printf(“$l,6,%d,%d,%d,%d#”,x ,y ,r ,fill==0?0:1); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
9.8 Draw Eclipse – “l,7” (0x6c, 0x37)
Draw an eclipse as implied.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d, %d : x, y, rx, ry, fill x, y: Circle’s center point rx: Circle’s horizontal radius ry: Circle’s vertical radius
fill >=1 -> Filled with pre-configured color, 0 -> unfilled Example
printf(“$l,7,%d,%d,%d,%d,%d#” ,x ,y ,rx ,ry ,fill==0?0:1); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 23 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
10. Image Command 10.1 Image Load – “i,1” (0x69, 0x31)
Loads the image file which is stored in NAND memory, to the specific index of graphic
memory. The index of graphic memory can be 0 ~ 1023 and the actual index size varies depending on the target image size. The usable graphic memory size is about 14Mbyte. For example, supposed that the target image size is 800 x 480 x16bpp and graphic memory is 12Mbyte, then JUFT70 can load about 15 images.
- 12Mbyte / (800 x 480 x 2(bytes/pixel) = 15 If trying to load into the occupied index, that is, the target index has been occupied with the old image, JUFT70 erases the existing old image and replaces with the new image.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %s : index, fname index : Index number of graphic memory to load the image
fname : File name stored in NAND memory Example
printf(“$i,1,%d,%s#”,index, fname); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
10.2 Draw Image – “i,2” (0x69, 0x32)
Displays the specific image which has been loaded into graphic memory, on LCD.
Response( HOST )
Return ‘+’ if success, otherwise ‘-‘ Argument %d, %d, %d : index, x, y
index: Image index number to display x, y: start point to draw image Example
printf(“$i,2,%d,%d,%d#” ,index, x, y); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 24 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
LCD
Source
(x,y)
10.3 Draw Image Rectangle – “i,3” (0x69, 0x33)
Displays the chosen rectangle area of the image which is loaded into graphic memory.
Response ( HOST )
Return ‘+’ if success, otherwise ‘-‘ Argument %d, %d, %d, %d, %d, %d, %d : index, dx, dy, sx, sy, w, h
index: image index number dx, dy: display start point sx, sy: start point to choose target image area w: width of target image area h: height of target image area Example
printf(“$i,3,%d,%d,%d,%d,%d,%d,%d#” ,index ,x ,y ,sx ,sy ,w ,h); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
LCD
Source
(sx,sy)(dx,dy)
JUTF70 User Guide v1.0
P a g e 25 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
10.4 Draw Image Scale – “i,4” (0x69, 0x34)
Scales the original image in the graphic memory and displays its scaled image to fit in the specified display area.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d, %d : index, x, y, w, h index: target image index x, y: display start point w: target width to scale and display h: target height to scale and display Example
printf(“$i,4,%d,%d,%d,%d,%d#” ,index ,x ,y ,w ,h); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
LCD
Source
(x,y)
w
10.5 Draw Image Scale Rectangle – “i,5” (0x69, 0x35)
Chooses the scaling area of the original image in graphic memory, scales and displays its scaled image to fit in the target display area
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %d, %d, %d, %d, %d, %d, %d, %d : index, dx, dy, dw, dh, sx, sy, sw, sh index: Original image index dx, dy: Display start point dw: Display width dh: Display height sx, sy: Image scaling start point sw: Image scaling width sh: Image scaling height
JUTF70 User Guide v1.0
P a g e 26 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
Example
printf(“$i,5,%d,%d,%d,%d,%d,%d,%d,%d,%d#”,index, dx, dy, dw, dh, sx, sy, sw, sh); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
LCD
Source
(sx,sy)(dx,dy)
dh
10.6 Image Release – “i,6” (0x69, 0x36)
Releases the loaded image in graphic memory as implied. After image release, graphic memory gets more space as big as the released image size.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d : index index: Image index to release Example
printf(“$i,6,%d#”, index); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 27 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
11. Text-Out Command 11.1 Text Out – ‘f,0’ (0x66, 0x30)
Displays a string at specified point.
Alphabet font size is 8x16 pixel and Korean font(combined Hangul) is 16x16 pixel.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %s, %d, %d : string, x, y string : String to display, No comma(‘,’) allowed in this string x, y : Display start point Example
printf(“$f,0,%s,%d,%d#” ,string ,x ,y); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
11.2 Text Color – ‘f,1’ (0x66, 0x31)
Changes the font color through tweaking RGB color combination.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d,%d,%d : red, green, blue red : Red color, value 0 ~ 255
green : Green color, value 0 ~ 255 blue : Blue color 0 ~ 255 Example
printf(“$f,1,%d,%d,%d#”,red, green, blue); //UART Tx function if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 28 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
12. Touch Input
When pushing/touching somewhere on the touch screen, its coordination value of (x, y) is generated and transferred through UART. If pushing and holding the same point on the touch screen, that is, its coordination value is not changed, then its coordination value is transferred only one time. Only if touch screen input is changed by touching different points as time goes on, its coordination value can be transferred through UART periodically.
12.1 Touch Input Packet The packet format with touch input coordination value is as following;.
‘$’ ‘t’ 'Status' 'X - coordinate' Y - coordinate' ‘#’
Status : 1 or 0
1 : Touched 0 : Not touched
Refer to following examples, the touch input coordination values retrieved through UART.
$t, 1, 100, 200# Touching x, y of (100, 200) $t, 1, 100, 202# Touching x, y of (100, 202) $t, 1, 100, 205# Touching x, y of (100, 205) $t, 0, 0, 0# No touching
JUTF70 User Guide v1.0
P a g e 29 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
13. Script Command
You can create a script file which comprises of multiple commands, store it in NAND
memory and execute that script file by running script command, ‘Run Script’. Combining frequently-used commands into one script file and executing this script file can speed up command transfer time and reduce the Host’s program size.
Script file must contain one command body per line, getting rid of ‘$’ SOP(Start of Packet) and ‘#’ EOP(End of Packet). Wrong example
$l,0,255,255,255# ( X ) -> Must get rid of $ and # l,0,255,255,255, l,0,255,255,0, l,0,255,0255 ( X ) -> Must contain one command body per line
13.1 10.1 Run Script – “c,0” (0x74,0x30)
Run a script file as implied. Response ( HOST )
Return ‘+’ if success, otherwise ‘-‘ Argument %s : filename
filename : Target script file name in NAND memory,
Example printf(“$c, 0, %s#”, filename); if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 30 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
14. Sound Command
14.1 Sound Load – “w,1” (0x77, 0x31)
Loads some wave file, stored in NAND memory, into a specific memory index.
Memory index range is 0 ~ 63 and its actual range varies depending on the wave file size.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d, %s : index, fname index: Memory index number to load the target wave file fname: File name stored in NAND memory Example
printf(“$w,1,%d,%s#” ,index, fname); if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
14.2 Sound Play – “w,2” (0x77, 0x32)
Plays the sound of the wave file which is loaded into memory to the speaker.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d : index index: Index number of the wave file to play
Example
printf(“$w,2,%d#”, index); if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 31 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
14.3 Sound Stop – “w,3” (0x77, 0x33)
Stops playing the wave file as implied.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d : index index: Index number of the wave file to stop
Example
printf(“$w,3,%d#”, index); if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
14.4 Sound Volume – “w,4” (0x77, 0x34)
Adjusts the sound volume as implied. Adjustable volume range is 0 ~ 255.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d : volume volume: Target volume
Example
printf(“$w,4,%d#”, volume); if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
JUTF70 User Guide v1.0
P a g e 32 | 33
Copyrights® 2016 T&1 Inc. All Rights Reserved
14.5 Speaker On/Off– “w,5” (0x77, 0x35)
Turns On/Off the speaker as implied.
Response ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d : flag flag: 0 (=Speaker Off), 1 (=Speaker On)
Example
printf(“$w,5,%d#”, flag); if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;
14.6 Sound Release – “w,6” (0x77, 0x36) Releases the loaded wave file from the memory. The index for the released wave file is no more available.
Release ( HOST ) Return ‘+’ if success, otherwise ‘-‘
Argument %d : index index: Index number of the wave file to release
Example
printf(“$w,6,%d#”, index); if ( ‘+’ == GET_UART_CHARACTER) //Get 1byte from UART
OK; else
ERROR;