VIZIC TECHNOLOGIES SMART GPU 2 3.5” TOUCH COMMAND SET----Rev 1.
SMART GPU 2 3.5” TOUCH Command Set SMART GPU 2– Intelligent Embedded Graphics, Vizic Technologies ©2014 Audio and Touch Processor.
SMART GPU 2 3.
SMART GPU 2 3.5” TOUCH Command Set Table of Contents: Description.….................................................................................................................6 Board Features………....................................................................................................8 SmartGPU 2 Board Explained…...................................................................................9 1. Host Interface.................................................................................
SMART GPU 2 3.5” TOUCH Command Set 2.5 Image Commands....................................................................................55 2.5.1 Draw Image/Icon – 49hex - I ascii…………………………………..……...57 2.5.2 Image BMP SD – 42hex - B ascii…………………………….……….…....59 2.5.3 Image JPG SD – 4Ahex - J ascii…………………………………………...62 2.5.4 Memory Read – 4Dhex - M ascii……………………………………………65 2.5.5 Screenshot BMP – 53hex - S ascii…………………………………………67 2.6 Video Commands.............................................................
SMART GPU 2 3.5” TOUCH Command Set 2.10 RTC Real Time Clock Commands......................................................119 2.10.1 RTC Setup –53hex – ‘S’ ascii……………………………………….…...120 2.10.2 RTC Set/Get Time and Date –50hex – ‘P’ ascii………………….……122 2.11 EEPROM-FLASH Commands.............................................................124 2.11.1 Init/Clear EEPROM Buffer–49hex – ‘I’ ascii……………………………126 2.11.2 Read Bytes from EEPROM Buffer–52hex – ‘R’ ascii…………………127 2.11.
SMART GPU 2 3.5” TOUCH Command Set Smart GPU 2: Intelligent Embedded Graphics, Audio and Touchscreen Processor. Description: The Smart GPU 2 is a powerful easy to use, intellectual property, embedded graphics, audio and touchscreen processor in a state-ofthe-art ARM Cortex-M3 chip; this is mounted on a board with a touchscreen color LCD. It's aimed to help developers to create advanced Graphical User Interfaces (GUIs) in a very easy way.
SMART GPU 2 3.5” TOUCH Command Set The next image clearly explains the roles played by the user host main processor and the Smart GPU 2 processor: Instead of loading all the Geometry, Images, audio, video, SD FAT memory access, etc. processing to the main host processor, the Smart GPU 2 does the entire job and stuff in parallel with the user microcontroller/microprocessor by receiving simple orders or commands.
SMART GPU 2 3.5” TOUCH Command Set Board Features: 3.5“, 480x320 pixels resistive touchscreen LCD, capable of displaying 262,144 colours. Easy 5 pin interface to any host device: VCC, TX, RX, GND, RESET. On-board uSD/uSDHC card adaptor, FAT(windows PC) Support up to 32GB for storing images and text, Data Logger functions (read-write) and LFN(long File Names). BMP and JPG images support. Video and Audio(CD quality) capable. Integrated 2 channel DACs outputs can play stereo audio.
SMART GPU 2 3.
SMART GPU 2 3.5” TOUCH Command Set 1.-Host Interface The Smart GPU 2 is a slave peripheral device and it provides a bidirectional serial interface to a host controller via its USART(Universal Serial Asynchronous Receiver - Transmitter). Any microcontroller or processor (AVR, PIC, BASICstamp, XXDUINO, raspberry PI, 8051, MBED, FPGA, ARM, STmicro, etc) or PC(by serial interface RS232) as host, can communicate to the device over this serial interface from 9600bps up to 2000000bps.
SMART GPU 2 3.5” TOUCH Command Set 1.2 Serial Set-up The Smart GPU 2 is configured to be always initialized at a standard baud rate of 9600 bps. So the first command that the host sends to the Smart GPU 2 must be at that speed. Always after any power-up or reset, the Smart GPU 2 must be initialized by sending the uppercase ascii character ‘U’ (55hex) at 9600bps. This will initialize all the processor, and when done it will respond with an ACK byte (4Fhex, ‘O’ascii).
SMART GPU 2 3.5” TOUCH Command Set 1.4 Splash Screen on Power Up The Smart GPU 2 will wait up to 3 seconds with its screen in black, for the host to transmit the Initial command (‘U’, 55hex). If the host has not transmitted this initial command the module will display its splash screen. If the host has transmitted only the initial command and has received a valid ACK, the screen will remain in black.
SMART GPU 2 3.5” TOUCH Command Set 2. SMART GPU 2 Command Set - Software Interface Specification 2. Command Set As mentioned before the command interface between the Smart GPU 2 and the host processor is via the serial interface USART/UART. A list of very easy to learn commands provide complete access to all the available functions. Commands and responses can be a single byte or a byte package. All commands always return a response, either a single ACK, or data followed by an ACK.
SMART GPU 2 3.5” TOUCH Command Set 2.
SMART GPU 2 3.5” TOUCH Command Set 2.1.1 Initialize SMART GPU 2 - 55hex - U ascii Commands (host) 1 byte 1.- 0x55 (hex), U (ascii). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This command is needed only once to initialize communication with the SMARTGPU2 after any power-up or reset, remember to wait at least 200ms after any power up or reset before sending this command.
SMART GPU 2 3.5” TOUCH Command Set 2.2 Master Commands Briefly Summary of Commands in this section: *All of Those next commands always begin with the byte ‘M’-4Dhex, as they are Master commands, followed by the next parameters/bytes.
SMART GPU 2 3.5” TOUCH Command Set 2.2.1 Erase Screen - 45hex - E ascii Commands (host) 2 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x45 (hex), E (ascii). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description Command needed to erase the entire screen, the display will be draw with the background colour if it is set before, if not, default background colour on reset or power on is black.
SMART GPU 2 3.5” TOUCH Command Set 2.2.2 Set Erase Background Colour - 43hex - C ascii Commands (host) 4 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x43 (hex), C (ascii). 3.- High byte colour. 4.- Low byte colour. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.2.3 Display Orientation – 4Fhex - O ascii Commands (host) 3 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x4F (hex), O (ascii). 3.- HorizontalR(landscape): 00(hex) or VerticalL(portrait): 01(hex) or HorizontalL(landscape): 02(hex) or VerticalT(portrait): 03(hex). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description Command needed to set display orientation mode, landscape or portrait.
SMART GPU 2 3.5” TOUCH Command Set 2.2.4 Display Brightness - 42hex - B ascii Commands (host) 3 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x42 (hex), B (ascii). 3.- Brightness value (0-100) (0 hex-64 hex). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description Command needed to adjust the display brightness, 0(0hex) stands for none, 100(64hex) stands for maximum brightness. Default brightness on reset or power on is 100(64hex).
SMART GPU 2 3.5” TOUCH Command Set 2.2.5 BaudRate Change – 58hex - X ascii Commands (host) 6 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x58 (hex), X (ascii). 3.- Baud Rate High Byte. 4.- Baud Rate Medium High Byte. 5.- Baud Rate Medium Low Byte. 6.- Baud Rate Low Byte. Responses (device) 1 byte when fail, 2 bytes when success 1.- 0x4F (hex), O (ascii) – success ACK at actual baud rate. --Delay of 500ms. 2.- 0x4F (hex), O (ascii) – success ACK at new baudrate. or Description 1.
SMART GPU 2 3.5” TOUCH Command Set 2.2.6 Sleep – 5Ahex - Z ascii Commands (host) 3 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x5A (hex), Z (ascii). 3.- Sleep On: 01(hex). Sleep Off: 00(hex). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description Command needed to set sleep mode. It takes 150ms to get in/out sleep mode after command is accepted.
SMART GPU 2 3.5” TOUCH Command Set 2.2.7 Calibrate Touch – 54hex - T ascii Commands (host) 3 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x54 (hex), T (ascii). 3.- 0x43 (hex), C (ascii). Calibrate. 0x53 (hex), S (ascii). Save Values. 0x44 (hex), D (ascii). Delete Values. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 9.-Finally the SmartGPU will store on RAM the new 4 working calibration values obtained with touch on points pressing. User can now call some drawing with touch routine to check If the calibration was successfully and the values are correct.
SMART GPU 2 3.5” TOUCH Command Set 2.2.8 Software Reset – 52hex - R ascii Commands (host) 2 bytes 1.- 0x4D (hex), M (ascii). *Master command 2.- 0x52 (hex), R (ascii). Responses (device) None Description This command performs total software RESET on the SmartGPU2, it has the same effect as a hardware RESET by the RST pin. After this command is called, user must have to initialize the SmartGPU2 with the initialize SmartGPU command (‘U’). Example (sent commands) Example 1: <4D,52> Reset SmartGPU 2.
SMART GPU 2 3.5” TOUCH Command Set 2.3 Geometry Commands Briefly Summary of Commands in this section: *All of Those next commands always begin with the byte ‘G’-47hex, as they are Geometry commands, followed by the next parameters/bytes.
SMART GPU 2 3.5” TOUCH Command Set 2.3.1 Put Pixel – 50hex - P ascii Commands (host) 8 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x50 (hex), P (ascii). 3.- X high byte. 4.- X low byte. 5.- Y high byte. 6.- Y low byte. 7.- High byte colour. 8.- Low byte colour. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This command draws a simple dot on the screen at the given X(16bit) and Y(16bit) coordinates.
SMART GPU 2 3.5” TOUCH Command Set 2.3.2 Draw Line – 4Chex - L ascii Commands (host) 12bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x4C (hex), L (ascii). 3.- X1 high byte. 4.- X1 low byte. 5.- Y1 high byte. 6.- Y1 low byte. 7.- X2 high byte. 8.- X2 low byte. 9.- Y2 high byte. 10.- Y2 low byte. 11.- High byte colour. 12.- Low byte colour. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.3.3 Draw Rectangle – 52hex - R ascii Commands (host) 13 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x52 (hex), R (ascii). 3.- X1 high byte. 4.- X1 low byte. 5.- Y1 high byte. 6.- Y1 low byte. 7.- X2 high byte. 8.- X2 low byte. 9.- Y2 high byte. 10.- Y2 low byte. 11.- High byte colour. 12.- Low byte colour. 13.- Fill: 0x00(hex) No Fill Geometry or 0x01(hex) Fill Geometry. Responses (device) 1 byte 1.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <47,52,00,46,00,32,00,C8,00,96,F8,1F,01> Draws a filled purple rectangle from X1:70(dec),Y1:50(dec) to X2:200(dec), Y2:150(dec). All data is in hex. Note: Maximum Xs or Ys acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.3.4 Draw Round Rectangle – 4Fhex - O ascii Commands (host) 15 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x4F (hex), O (ascii). 3.- X1 high byte. 4.- X1 low byte. 5.- Y1 high byte. 6.- Y1 low byte. 7.- X2 high byte. 8.- X2 low byte. 9.- Y2 high byte. 10.- Y2 low byte. 11.- Radius high byte. 12.- Radius low byte. 13.- High byte colour. 14.- Low byte colour. 15.- Fill: 0x00(hex) No Fill Geometry or 0x01(hex) Fill Geometry. Responses (device) 1 byte 1.
SMART GPU 2 3.5” TOUCH Command Set All data is in hex. Note: Maximum Xs or Ys acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.3.5 Draw Gradient Rectangle – 47hex - G ascii Commands (host) 15 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x47 (hex), G (ascii). 3.- X1 high byte. 4.- X1 low byte. 5.- Y1 high byte. 6.- Y1 low byte. 7.- X2 high byte. 8.- X2 low byte. 9.- Y2 high byte. 10.- Y2 low byte. 11.- High byte first colour. 12.- Low byte first colour. 13.- High byte second colour. 14.- Low byte second colour. 15.- Direction: 0x00(hex) Horizontal. 0x01(hex) Vertical.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <47,47,00,32,00,3C,01,2C,00,C8,00,1F,F9,E0,00> Draws a horizontal blue + red gradient rectangle from X1:50(dec), Y1:60(dec) to X2:300(dec), Y2:200(dec). Example 3: <47,47,00,32,00,3C,01,2C,00,C8,00,1F,F9,E0,01> Draws a vertical blue + red gradient rectangle from X1:50(dec), Y1:60(dec) to X2:300(dec), Y2:200(dec). All data is in hex. Note: Maximum Xs or Ys acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.3.6 Draw Arc – 41hex - A ascii Commands (host) 14 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x41 (hex), A (ascii). 3.- X high byte. 4.- X low byte. 5.- Y high byte. 6.- Y low byte. 7.- Radius in X high byte. 8.- Radius in X low byte. 9.- Radius in Y high byte. 10.- Radius in Y low byte. 11.- Arc quadrant to draw. 12.- High byte colour. 13.- Low byte colour. 14.- Fill: 0x00(hex) No Fill Geometry or 0x01(hex) Fill Geometry. Responses (device) 1 byte 1.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <47,41,00,A0,00,78,00,64,00,50,01,FF,E0,00> Draws a no filled yellow Arc in quadrant 1, with center in X:160(dec), Y:120(dec), RADIUSX:100(dec) and RADIUSY:80(dec). Example 2: <47,41,00,A0,00,78,00,64,00,50,03,FF,E0,00> Draws a no filled yellow Arc in quadrant 3, with center in X:160(dec), Y:120(dec), RADIUSX:100(dec) and RADIUSY:80(dec).
SMART GPU 2 3.5” TOUCH Command Set 2.3.7 Draw Circle – 43hex - C ascii Commands (host) 11 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x43 (hex), C (ascii). 3.- X high byte. 4.- X low byte. 5.- Y high byte. 6.- Y low byte. 7.- Radius high byte. 8.- Radius low byte. 9.- High byte colour. 10.- Low byte colour. 11.- Fill: 0x00(hex) No Fill Geometry or 0x01(hex) Fill Geometry. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <47,43,00,96,00,78,00,50,FF,E0,01> Draws a filled yellow circle with center X:150(dec), Y:120(dec) and RADIUS:80(dec). All data is in hex. Note: Maximum Xs or Ys acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.3.8 Draw Ellipse – 45hex - E ascii Commands (host) 13 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x45 (hex), E (ascii). 3.- X high byte. 4.- X low byte. 5.- Y high byte. 6.- Y low byte. 7.- Radius in X high byte. 8.- Radius in X low byte. 9.- Radius in Y high byte. 10.- Radius in Y low byte. 11.- High byte colour. 12.- Low byte colour. 13.- Fill: 0x00(hex) No Fill Geometry or 0x01(hex) Fill Geometry. Responses (device) 1 byte 1.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <47,45,00,A0,00,78,00,32,00,64,FF,E0,01> Draws a filled yellow ellipse, with center in X:160(dec), Y:120(dec), RADIUSX:50(dec) and RADIUSY:100(dec). All data is in hex. Note: Maximum Xs or Ys acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.3.9 Draw Triangle – 54hex - T ascii Commands (host) 17 bytes 1.- 0x47 (hex), G (ascii). *Geometry Command. 2.- 0x54 (hex), T (ascii). 3.- X1 high byte. 4.- X1 low byte. 5.- Y1 high byte. 6.- Y1 low byte. 7.- X2 high byte. 8.- X2 low byte. 9.- Y2 high byte. 10.- Y2 low byte. 11.- X3 high byte. 12.- X3 low byte. 13.- Y3 high byte. 14.- Y3 low byte. 15.- High byte colour. 16.- Low byte colour. 17.- Fill: 0x00(hex) No Fill Geometry or 0x01(hex) Fill Geometry.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <47,54,00,32,00,3C,00,64,00,C8,00,E6,00,78,F8,00,01> Draws a filled red triangle with given points: X1:50(dec), Y1:60(dec), X2:100(dec), Y2:200(dec) and X3:230(dec), Y3:120(dec). All data is in hex. Note: Maximum Xs or Ys acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.4 Text/String Commands The SMART GPU 2 is capable of generate 13 different sizes of fonts, with transparent or colour background, font type is Helvetica Neue. The command Display String requires two points that forms an imaginary text box that helps delimit the text writing to certain area; it is helpful when the user only wants to display text only on some area of the screen. Smart GPU 2 can also manage text files, so any file with .
SMART GPU 2 3.5” TOUCH Command Set 2.4.1 Put Letter – 4Chex - L ascii Commands (host) 7 bytes 1.- 0x53 (hex), S (ascii). *String Command. 2.- 0x4C (hex), L (ascii). 3.- X coord high byte. 4.- X coord low byte. 5.- Y coord high byte. 6.- Y coord low byte. 7.- letter to display in (0xXX) hex (ascii equivalent). Responses (device) Up X (2 bytes) + 1 byte ACK 1.- Up X high byte 2.- Up X low byte 3.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <53,4C,00,14,00,1E,41> Draw an ‘A’ letter, with top left corner at X:20(dec),Y:30(dec). Filled Background colour is Set and Font Size was changed to Size 3. Example 3: <53,4C,00,14,00,1E,41> Draw an ‘A’ letter, with top left corner at X:20(dec),Y:30(dec), Background colour was changed to RED, Filled Background colour is Set and Font Size was changed to Size 3. All data is in hex. Note: Maximum X or Y acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.4.2 Print Number – 4Ehex - N ascii Commands (host) 10 bytes 1.- 0x53 (hex), S (ascii). *String Command. 2.- 0x4E (hex), N (ascii). 3.- X coord high byte. 4.- X coord low byte. 5.- Y coord high byte. 6.- Y coord low byte. 7.- Float Number High Byte. 8.- Float Number Medium High Byte. 9.- Float Number Medium Low Byte. 10.-Float Number Low Byte. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <53,4E,00,0A,00,0F,41,49,3F,7D> Draws an “12.578” number, with top left corner at X:10(dec),Y:15(dec). With Font4 settings. Example 3: <53,4E,00,0A,00,0F,4E,01,83,9D> Draws an “543221568” number, with top left corner at X:10(dec),Y:15(dec). With Font4 settings. Example 4: <53,4E,00,0A,00,0F,C1,BB,A7,87> Draws an “-23.4568” number, with top left corner at X:10(dec),Y:15(dec). With Font4 settings. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.4.3 Display String – 53hex - S ascii Commands (host) 10 bytes + string + 1byte(NULL) 1.- 0x53 (hex), S (ascii). *String Command. 2.- 0x53 (hex), S (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. 11 up to N.- string text (hex) ascii equivalent. N+1.- 0x00 (hex) NULL ascii. Responses (device) SPC(2 bytes) + 1 byte ACK 1.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <53,53,00,14,00,28,00,87,00,64,text...,00> Draws a string/text with top left corner at X1:20(dec), Y1:40(dec), and bottom right corner X2:135(dec), Y2:100(dec). Font Size was changed to Size 3. text= String test over Smart GPU processor Note: the black dotted box is just to exemplify the imaginary defined text box, it is not actually drawn. Example 2: <53,53,00,14,00,28,00,87,00,64,text...
SMART GPU 2 3.5” TOUCH Command Set 2.4.4 Display String SD – 46hex - F ascii Commands (host) 14 bytes + text file name + 1byte(NULL) 1.- 0x53 (hex), S (ascii). *String Command. 2.- 0x46 (hex), F (ascii). –from SD .txt File 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. 11.- Start Character (position) high byte. 12.- Start Character (position) low byte. 13.
SMART GPU 2 3.5” TOUCH Command Set the file contents up from the given Start Character position and display the text while it fits on the given text box. The maximum number of characters to read from a file in one call is 5000 bytes (characters). The file name must be up to 250 characters. Only numbers and letters are recommended to name the file, some special characters are not allowed and may not work.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <53,46,00,14,00,32,00,8C,00,A0,00,00,00,1E,74,65,78,74,31,00> Opens the same “text1.txt” file of the SDcard with top left corner at X1:20(dec), Y1:50(dec) and bottom right corner at X2:140(dec), Y2:160(dec), Start Character 0x0000, Characters to Read 30(dec)0x001E(hex). Text colour was changed to WHITE and Font Size was changed to Size 3. Example 3: <53,46,00,14,00,32,00,8C,00,A0,00,0B,00,0E,74,65,78,74,31,00> Opens the same “text1.
SMART GPU 2 3.5” TOUCH Command Set 2.4.5 Strings Configuration - 43hex - C ascii *This command is divided in 4 sub-commands, each one is explained next: Commands (host) X bytes Set Text Colour 1.- 0x53 (hex), S (ascii). *String Command. 2.- 0x43 (hex), C (ascii). – Config. 3.- 0x54 (hex), T (ascii). 4.- High byte text colour. 5.- Low byte text colour. Set Text Background Colour 1.- 0x53 (hex), S (ascii). *String Command. 2.- 0x43 (hex), C (ascii). – Config. 3.- 0x42 (hex), B (ascii). 4.
SMART GPU 2 3.5” TOUCH Command Set Defaults at reset/power on are: -WHITE Text Colour. -BLACK Background Colour. -FONT0 Text Size. -UNFILLED Background fill/unfill. Colour format is the same RGB565. Example (sent commands) Example 1: <53,43,54,FF,E0> Set Text colour to YELLOW (0xFFE0). Example 2: <53,43,42,06,E0> Set Text Background colour to GREEN(0x06E0). Example 3: <53,43,53,02> Set Text Size to FONT2. Example 4: <53,43,46,01> Set Text Background fill to FILLED. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.5 Image Commands The SMART GPU 2, unlike other graphic development tools in the market, is the only embedded graphic processor capable of managing files directly in FAT/FAT12/FAT16 or FAT32 file systems without any special program/interface or micro SD rare formats. It is fully compatible with any PC. Smart GPU 2 can manage images, so any file with .bmp or .jpg extension will be easily opened and displayed.
SMART GPU 2 3.5” TOUCH Command Set The SMART GPU 2 contains a 230,400bytes (1,843,200bits) internal memory, that stores the current display image on the screen, the command Memory Read, allows the host to be able to read this internal memory in order to know the value of the pixels or what is being displayed in some area or the full screen at that particular moment.
SMART GPU 2 3.5” TOUCH Command Set 2.5.1 Draw Image/Icon – 49hex - I ascii Commands (host) 10 bytes + pixel number x 2 1.- 0x49 (hex), I (ascii). *Image Command. 2.- 0x49 (hex), I (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. Now send pixel by pixel: 11.- High byte colour pixel 1. 12.- Low byte colour pixel 1. 13.- High byte colour pixel 2. 14.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <49,49,00,1E,00,28,00,BD,00,9F, Pix1H,Pix1L,Pix2H,Pix2L,…,PixNH,PixNL> Draws an image of 160x120 pixels with top left corner: X1:30(dec),Y1:40(dec) and bottom right corner: X2:189(dec), Y2:159(dec). Example 2: <49,49,00,00,00,00,00,9F,00,77, Pix1H,Pix1L,Pix2H,Pix2L,…,PixNH,PixNL> Draws an image of 160x120 pixels with top left corner: X1:0(dec),Y1:0(dec) and bottom right corner: X2:159(dec), Y2:119(dec). All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.5.2 Image BMP SD – 42hex - B ascii Commands (host) 6 bytes + image name + 1byte(NULL) 1.- 0x49 (hex), I (ascii). *Image Command. 2.- 0x42 (hex), B (ascii). 3.- X coord high byte (left corner). 4.- X coord low byte. 5.- Y coord high byte (top corner). 6.- Y coord low byte. 7 up to N (file name). N+1.- 0x00 (hex) NULL ascii. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <49,42,00,00,00,00,4A,65,6C,6C,79,38,30,00> Opens the 160x120 pixels “Jelly80.bmp” file with top left corner at X:00(dec), Y:00(dec) and displays it on the screen. Example 3: <49,42,00,28,00,1E,4A,65,6C,6C,79,38,30,00> Opens the 160x120 pixels “Jelly80.bmp” file with top left corner at X:40(dec), Y:30(dec) and displays it on the screen.
SMART GPU 2 3.5” TOUCH Command Set Example 4: <49,42,00,28,00,1E,66,72,61,63,74,61,6C,00> Opens the 160x120 pixels “fractal.bmp” file with top left corner at X:40(dec), Y:30(dec) and displays it on the screen. For example: An Image of size 160x120, could not be called to be displayed on X>160(dec) and Y>120(dec), because it won't fit on the screen, and command will fail. As mentioned before, user is responsible of calling images with top left corners that ensures that the image will fit on the display.
SMART GPU 2 3.5” TOUCH Command Set 2.5.3 Image JPG SD – 4Ahex - J ascii Commands (host) 7 bytes + image name + 1byte(NULL) 1.- 0x49 (hex), I (ascii). *Image Command. 2.- 0x4A (hex), J (ascii). 3.- X coord high byte (left corner). 4.- X coord low byte. 5.- Y coord high byte (top corner). 6.- Y coord low byte. 7.- Scale Factor(1/1, 1/2, 1/4, 1/8). 8 up to N (file name). N+1.- 0x00 (hex) NULL ascii. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <49,4A,00,00,00,00,00,4B,4F,41,4C,41,00> Opens the 320X240pixels “KOALA.bmp” file with top left corner at X:00(dec), Y:00(dec), scale factor 1/1(0x00) and displays it on the screen. Example 2: <49,4A,00,00,00,00,01,4A,65,6C,6C,79,38,30,00> Opens the 320x240 pixels “Jelly80.bmp” file with top left corner at X:00(dec), Y:00(dec), scale factor 1/2(0x01) and displays it on the screen.
SMART GPU 2 3.5” TOUCH Command Set Example 4: <49,4A,00,28,00,1E,01,66,72,61,63,74,61,6C,00> Opens the 320x240 pixels “fractal.bmp” file with top left corner at X:40(dec), Y:30(dec) , scale factor 1/2(0x01) and displays it on the screen. For example: An Image of size 160x120(scale factor 1/1), could not be called to be displayed on X>160(dec) and Y>120(dec), because it won't fit on the screen, and command will fail, however if user select scale factor 1/2, image will fit.
SMART GPU 2 3.5” TOUCH Command Set 2.5.4 Memory Read – 4Dhex - M ascii Commands (host) 10 bytes 1.- 0x49 (hex), I (ascii). *Image Command. 2.- 0x4D (hex), M (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. Responses (device) pixel number multiplied by 3(R,G,B) 1-N- pixels defined by the X1(16bit), Y1(16bit), and X2(16bit), Y2(16bit) window. N+1.
SMART GPU 2 3.5” TOUCH Command Set Example 1: <49,4D,00,00,00,00,00,4F,00,3B> Reads the contents of the SMART GPU memory from the top left corner: X1:00(dec),Y1:00(dec) and bottom right corner: X2:79(dec), Y2:59(dec), and returns the next image of 80x60 pixels, sent as RGB each pixel.
SMART GPU 2 3.5” TOUCH Command Set 2.5.5 Screenshot BMP – 53hex - S ascii Commands (host) 2 bytes 1.- 0x49 (hex), I (ascii). *Image Command. 2.- 0x53 (hex), S (ascii). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This command reads the internal memory of the SMART GPU 2 that is currently displayed, creates a file named “ScreenshotXXX.bmp” on the microSD card, and appends the read memory data from screen to the file, creating a .
SMART GPU 2 3.5” TOUCH Command Set 2.6 Video Commands The SMART GPU 2, unlike other graphic development tools in the market, is the only embedded graphic processor capable of managing files directly in FAT/FAT12/FAT16 or FAT32 file systems without any special program/interface or micro SD rare formats. It is fully compatible with any PC. Smart GPU 2 can manage video; files with custom extension .vid will be easily opened and played.
SMART GPU 2 3.5” TOUCH Command Set The Frames data of a .vid file that SmartGPU 2 can play is composed of VideoWidth x VideoHeight x totalVideoFrames x 2 bytes, that is: -Each pixel of video data is composed by 2 bytes with the RGB 565 convention: R4R3R2R1R0G5G4G3 G2G1G0B4B3B2B1B0 That is: 5bits for red, 6 bits for green, 5bits for blue. High byte colour: R4R3R2R1R0G5G4G3 Low byte colour: G2G1G0B4B3B2B1B0 -The size of each video frame is the multiplication of VideoWidth x Video Height x 2.
SMART GPU 2 3.5” TOUCH Command Set 2.6.1 Allocate Video SD – 41hex - A ascii Commands (host) 2 bytes + Video name + 1byte(NULL) 1.- 0x56 (hex), V (ascii). *Video Command. 2.- 0x41 (hex), A (ascii). 3 up to N (file name). N+1.- 0x00 (hex) NULL ascii. Responses (device) 8 bytes + 1 byte ACK/NAK 1.- Video Width high byte. 2.- Video Width low byte. 3.- Video Height high byte. 4.- Video Height low byte. 5.- Video Frames per Second high byte. 6.- Video Frames per Second low byte. 7.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <56,41,77,69,6C,64,6C,69,66,65,00> Allocates the “wildlife.vid” video file in the SmartGPU 2 buffer. Example 2: <56,41,6E,61,74,75,72,65,00> Allocates the “nature.vid” video file in the SmartGPU 2 buffer. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.6.2 Play Video SD – 4Ahex - J ascii Commands (host) 8 bytes 1.- 0x56 (hex), V (ascii). *Video Command. 2.- 0x50 (hex), P (ascii). 3.- X coord high byte (left corner). 4.- X coord low byte. 5.- Y coord high byte (top corner). 6.- Y coord low byte. 7.- Frames to Play high byte. 8.- Frames to Play low byte. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <56,50,00,00,00,00,00,64> Plays 100(dec) frames from a video allocated on the SmartGPU 2 buffer, with top left corner at X:00(dec), Y:00(dec). Example 2: <56,50,00,32,00,50,00,64> Plays 100(dec) frames from a video allocated on the SmartGPU 2 buffer, with top left corner at X:50(dec), Y:80(dec).
SMART GPU 2 3.5” TOUCH Command Set 2.6.3 Set Frame Video SD – 46hex - F ascii Commands (host) 4 bytes 1.- 0x56 (hex), V (ascii). *Video Command. 2.- 0x46 (hex), F (ascii). 3.- Frame to Set high byte. 8.- Frame to Set low byte. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.6.4 De-Allocate Video SD – 44hex - D ascii Commands (host) 2 bytes 1.- 0x56 (hex), V (ascii). *Video Command. 2.- 0x44 (hex), D (ascii). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This command de-allocates a previously allocated video on the SmartGPU 2 buffer, this command can also be seen as “close an open video file” and frees the buffer.
SMART GPU 2 3.5” TOUCH Command Set 2.7 Audio Commands The SMART GPU 2, unlike other graphic development tools in the market, is the only embedded graphic processor capable of managing files directly in FAT/FAT12/FAT16 or FAT32 file systems without any special program/interface or micro SD rare formats. It is fully compatible with any PC. Smart GPU 2 can manage Audio files, so any file with .wav extension will be easily opened and played.
SMART GPU 2 3.5” TOUCH Command Set 2.7.1 Initialize/De-initialize DACs/Audio – 49hex - I ascii Commands (host) 3 bytes 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x49 (hex), I (ascii). 3.- DACs state: OFF 0x00(hex) or ON 0x01(hex). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description Command needed to turn ON or turn OFF the audio DACs outputs (refer to datasheet to learn more about audio DACs).
SMART GPU 2 3.5” TOUCH Command Set 2.7.2 Play WAV File – 50hex - P ascii Commands (host) 2 bytes + file name + 1byte(NULL) 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x50 (hex), P (ascii). 3 up to N (file name). N+1.- 0x00 (hex) NULL ascii. Responses (device) 2 bytes + 1 byte ACK/NAK 1.- File duration in seconds high byte. 2.- File duration in seconds low byte. 3.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <41,50,73,6F,75,6E,64,00> Play the audio “sound.wav” stored on the microSD card. file Example 2: <41,50,72,6F,63,6B,00> Play the audio file “rock.wav” stored on the microSD card. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.7.3 Pause WAV File – 57hex - W ascii Commands (host) 2 bytes 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x57 (hex), W (ascii). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description When command is successfully executed (ACK), it simply toggles between pause and play audio states. This command is only valid when an audio file is being played, otherwise will always return NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.7.4 Advance WAV File – 41hex - A ascii Commands (host) 4 bytes 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x41 (hex), A (ascii). 3.- File second high byte. 4.- File second low byte. Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This command advances/rewinds the currently playing audio file, to the desired File Second parameter.
SMART GPU 2 3.5” TOUCH Command Set 2.7.5 Stop WAV File – 53hex - S ascii Commands (host) 2 bytes 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x53 (hex), S (ascii). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description When command is successfully executed (ACK), it simply stops a currently playing audio file. Example (sent commands) Example 1: <41,53> Stop Audio File. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.7.6 Set Volume WAV – 56hex - V ascii Commands (host) 3 bytes 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x56 (hex), V (ascii). 3.- Volume to set 0-100(dec) 0x00-0x64(hex). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description Command needed to adjust the audio volume output, 0(0hex) stands for none, 100(64hex) stands for maximum audio volume. Default audio volume on reset or power on is 100(64hex).
SMART GPU 2 3.5” TOUCH Command Set 2.7.7 Get Playing State – 47hex - G ascii Commands (host) 2 bytes 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x47 (hex), G (ascii). Responses (device) 1 byte + 1 byte ACK/NAK 1.- Playing State: 0x00(hex) Active or 0x01(hex) Not Active. 2.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.7.8 Audio Boost WAV File – 42hex - B ascii Commands (host) 3 bytes 1.- 0x41 (hex), A (ascii). *Audio Command. 2.- 0x42 (hex), B (ascii). 3.- Boost State: OFF 0x00(hex) or ON 0x01(hex). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description Command needed to turn ON or turn OFF the audio output boost (refer to datasheet to learn more about this feature).
SMART GPU 2 3.5” TOUCH Command Set 2.8 Touch Commands The integrated touch controller on the SMART GPU 2 chip, it’s an accurate 12 bit ADC reader, very accurate and perfectly debugged to avoid unwanted touch points. This touch controller manages a resistive touch screen that is capable of handling finger touch and stylus pen touch, however for a precision drawing it’s recommended the use of stylus.
SMART GPU 2 3.5” TOUCH Command Set 2.8.1 Get Touchscreen – 53hex - S ascii Commands (host) 1 byte 1.- 0x54 (hex), T (ascii). *Touch command. 2.- 0x53 (hex), S (ascii). Responses (device) 4 bytes + 1 byte ACK/NAK 1.- X coord high byte. 2.- X coord low byte. 3.- Y coord high byte. 4.- Y coord low byte. 5.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) and received Example 1: <54,53> 01,15,00,56,4F – A valid touch point is obtained with X:277(dec), Y:86(dec) coordinates. Example 2: <54,53> 00,96,00,32,4F – A valid touch point is obtained with X:150(dec), Y:50(dec) coordinates. Example 3: <54,53> 00,00,00,00,46 – Not valid touch point is obtained(means no touch on screen), X:00(dec) and Y:00(dec) coordinates must be discarded. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.8.2 Get Touch Icons – 49hex - I ascii Commands (host) 1 byte 1.- 0x54 (hex), T (ascii). *Touch command. 2.- 0x49 (hex), I (ascii). Responses (device) 1 byte + 1 byte ACK/NAK 1.- Icon Name First Capital Letter. 2.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This Command performs a reading on the touchscreen panel and responds immediately the current reading in that specific time.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) and received Example 1: <54,49> 48,4F – A valid touch on “Home” Icon is obtained. Example 2: <54,49> 50,4F – A valid touch on “Phone” Icon is obtained. Example 3: <54,49> 4E,46 – Not valid touch on Icon is obtained(means no touch on screen panel), Icon letter must be discarded. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.9 FAT Data Management/Data Logger Commands The new Smart GPU 2 includes full Data management functions, create files/dirs, open files/dirs, read files, write files, etc. Those full Data Logger functions enable full possibilities with the Smart GPU 2, as it is now more complete than ever. User can create easy and advanced Data Logger + graphic applications.
SMART GPU 2 3.5” TOUCH Command Set File ACK List: As Mentioned before, those FAT Data Management commands always respond 2 ACKs, first ACK is for File Operation, and second ACK is for command success.
SMART GPU 2 3.5” TOUCH Command Set 2.9.1 List Dirs and Files –4Chex – ‘L’ ascii Commands (host) 2 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4C (hex), L (ascii). (List Dirs and Files) Responses (device) Number of Dirs(2 bytes) + Number of Files(2 bytes) + 1 byte File ACK + 1 byte Command ACK 1.- Number of Directories (high byte). 2.- Number of Directories (low byte). 3.- Number of Files (high byte). 4.- Number of Files (low byte). 5.- 0xXX (hex) - Refer to “File ACK List”. 6.
SMART GPU 2 3.5” TOUCH Command Set 2.9.2 Get Name of Item Number# –47hex – ‘G’ ascii Commands (host) 5 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x47 (hex), G (ascii). (Get Name) 3.- Dir/File Item: 0x44 (hex), D (ascii) Dir Item or 0x46 (hex), F (ascii) File Item. 4.- Item Number (high byte). 5.- Item Number (low byte). Responses (device) Dir/File Name + 1 byte NULL + 1 byte File ACK + 1 byte Command ACK 1 up to N.- Dir/File Name. N+1.- 0x00(hex), NULL(ascii). N+2.
SMART GPU 2 3.5” TOUCH Command Set 2.9.3 Get Dir Path –48hex – ‘H’ ascii Commands (host) 2 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x48 (hex), H (ascii). (Get Path) Responses (device) Directory path name + 1 byte NULL + 1 byte File ACK + 1 byte Command ACK 1 up to N.- Directory path name. N+1.- 0x00(hex), NULL(ascii). N+2.- 0xXX (hex) - Refer to “File ACK List”. N+3.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.9.4 New Dir/File – 4Ehex - ‘N’ ascii Commands (host) 3 bytes + Dir or File name with “.ext” + 1byte(NULL). 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4E (hex), N (ascii). (New Dir/File) 3.- Dir/File Item: 0x44 (hex), D (ascii) Dir Item or 0x46 (hex), F (ascii) File Item. 4 up to N (file name including extension). N+1.- 0x00 (hex) NULL ascii. Responses (device) 1 byte File ACK + 1 byte Command ACK 1.- 0xXX (hex) - Refer to “File ACK List”. 2.
SMART GPU 2 3.5” TOUCH Command Set 2.9.5 Open Directory/Folder –44hex – ‘D’ ascii Commands (host) 2 bytes + Dir name + 1byte(NULL). 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x44 (hex), D (ascii). (Open Dir) 3 up to N (file name including extension). N+1.- 0x00 (hex) NULL ascii. Responses (device) 1 byte File ACK + 1 byte Command ACK 1.- 0xXX (hex) - Refer to “File ACK List”. 2.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example 3: *Current directory path is “0:/ABC”. <46,44,2E,2E,00> Go to parent Directory “..” (goes up one level). *After command succeeds Current directory path is now “0:/” root path. Example 4: *Current directory path is “0:/ABC/0123”. <46,44,2E,2E,00> Go to parent Directory “..”(goes up one level). *After command succeeds Current directory path is now “0:/ABC”. Example 5: *Current directory path is “0:/ABC/0123”. <46,44,30,3A,2F,00> Go directly to root “0:/”.
SMART GPU 2 3.5” TOUCH Command Set 2.9.6 Open File –4Fhex – ‘O’ ascii Commands (host) 4 bytes + file name with “.ext” + 1byte(NULL). 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4F (hex), O (ascii). (Open File) 3.- Workspace Block# 0x00(hex) – 0x03(hex). 4.- Open Mode: 0x01 (hex)- Read Only 0x02 (hex)- Write Only 0x03 (hex)- Read +Write 5 up to N (file name including extension). N+1.- 0x00 (hex) NULL ascii. Responses (device) 1 byte File ACK + 1 byte Command ACK 1.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <46,4F,01,02,30,31,32,33,2E,74,78,74,00> Open file “0123.txt” in Workspace block 0x01, for write only access. Example 2: <46,4F,00,01,41,42,43,2E,77,78,6C,00> Open file “ABC.wxl” in Workspace block 0x00 for read only access. Example 2: <46,4F,03,03,30,31,32,33,2E,74,78,74,00> Open file “0123.txt” in Workspace block 0x03 for read+write access. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.9.7 Read File –52hex – ‘R’ ascii Commands (host) 5 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x52 (hex), R (ascii). (Read File) 3.- Workspace Block# 0x00(hex) – 0x03(hex) 4.- Bytes to Read (High byte). 5.- Bytes to Read (Low byte). Responses (device) N Data bytes + 2 bytes (Successfully Read Bytes) + 1 File ACK + 1 Command ACK 1 up to N.- File Data bytes.(N= Bytes to Read) N+1.- Successfully Read bytes (High byte). N+2.- Successfully Read bytes (Low byte).
SMART GPU 2 3.5” TOUCH Command Set If no File is allocated in the Workspace block# received parameter during a “Read File” command, this command will fail with INVALID OBJECT, as an attempt to read data from an empty Workspace block was done. Example (sent commands) Example 1: <46,52,01,00,0A> Read 10(dec) bytes from the Workspace block 0x01 file object. (file pointer will increase 10 positions after this command). Example 2: <46,52,02,13,88> Read 5000(dec) bytes from the Workspace block 0x02 file object.
SMART GPU 2 3.5” TOUCH Command Set 2.9.8 Write File –57hex – ‘W’ ascii Commands (host) 5 bytes + N Data bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x57 (hex), W (ascii). (Write File) 3.- Workspace Block# 0x00(hex) – 0x03(hex). 4.- Bytes to Write (High byte). 5.- Bytes to Write (Low byte). 6 up to N.- File Data bytes. (N= Bytes to Write). *Max Bytes to Write parameter is 512 (dec). Responses (device) 2 bytes (Successfully Written Bytes) + 1 File ACK + 1 Command ACK 1.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <46,57,02,00,0A,(data to write)> Write 10(dec) bytes to the Workspace block 0x02 file object. (file pointer will increase 10 positions after this command). Example 2: <46,57,01,02,00,(data to write)> Write 512(dec) (MAX in one call) bytes to the Workspace block 0x01 file object. (file pointer will 512 increase positions after this command). All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.9.9 Set/Get Pointer –50hex – ‘P’ ascii *This command is divided in 2 sub-commands, each one is explained next: Commands (host) X bytes Set File Pointer position: 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x50 (hex), P (ascii). (File Pointer) 3.- Workspace Block# 0x00(hex) – 0x03(hex) 4.- 0x53 (hex), S (ascii). (Set) 5.- Position high byte. 6.- Position medium high byte. 7.- Position medium low byte. 8.- Position low byte. Get File Pointer position: 1.
SMART GPU 2 3.5” TOUCH Command Set When an offset above the file size is specified in write mode, the file size is increased to the offset(cluster pre-allocation); data contained in the expanded area is undefined. This is suitable to append data to a file in a quick manner, for fast write operation. Note that Each time a “Read File” or “Write File” operation is performed; the file pointer advances the read or written bytes.
SMART GPU 2 3.5” TOUCH Command Set 2.9.10 Sync File –53hex – ‘S’ ascii Commands (host) 3 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x53 (hex), S (ascii). (Sync File) 3.- Workspace Block# 0x00(hex) – 0x03(hex) Responses (device) 1 byte File ACK + 1 byte Command ACK 1.- 0xXX (hex) - Refer to “File ACK List”. 2.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.9.11 Test Error-EOF File –51hex – ‘Q’ ascii Commands (host) 4 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x51 (hex), Q (ascii). (Test File) 3.- Workspace Block# 0x00(hex) – 0x03(hex) 4.- Test Type: 0x52, R (ascii) Error test or 0x45, E (ascii) End Of File test. Responses (device) 1 byte + 1 byte File ACK + 1 byte Command ACK 1.- Test result 0x00 (hex) or 0x01 (hex). 2.- 0xXX (hex) - Refer to “File ACK List”. 3.- 0x4F (hex), O (ascii) – success ACK.
SMART GPU 2 3.5” TOUCH Command Set 2.9.12 Close File –43hex – ‘C’ ascii Commands (host) 3 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x43 (hex), C (ascii). (Close File) 3.- Workspace Block# 0x00(hex) – 0x03(hex) Responses (device) 1 byte File ACK + 1 byte Command ACK 1.- 0xXX (hex) - Refer to “File ACK List”. 2.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK. Description The Close File command closes a Workspace block# file object.
SMART GPU 2 3.5” TOUCH Command Set 2.9.13 Truncate File –56hex – ‘V’ ascii Commands (host) 3 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x56 (hex), V (ascii). (Truncate File) 3.- Workspace Block# 0x00(hex) – 0x03(hex) Responses (device) 1 byte File ACK + 1 byte Command ACK 1.- 0xXX (hex) - Refer to “File ACK List”. 2.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.9.14 Erase Dir/File –45hex – ‘E’ ascii Commands (host) 3 bytes + Dir or 1byte(NULL). File name with “.ext” + 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x45 (hex), E (ascii). (Erase Dir/File) 3.- 0x4F Security un-lock byte. 3 up to N (Dir/File name including extension). N+1.- 0x00 (hex) NULL ascii. Responses (device) 1 byte File ACK + 1 byte Command ACK 1.- 0xXX (hex) - Refer to “File ACK List”. 2.- 0x4F (hex), O (ascii) – success ACK.
SMART GPU 2 3.5” TOUCH Command Set 2.9.15 Dir/File Rename/Move –4Dhex – ‘M’ ascii Commands (host) 2 bytes + Dir/File OLD name with “.ext” + 1byte(NULL) + Dir/File NEW name with “.ext” + 1byte(NULL). 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x4D (hex), M (ascii). (Rename/Move Dir/File) 3 up to N (OLD Dir/File name including extension). N+1.- 0x00 (hex) NULL ascii(end of OLD name). N+2 up to M (NEW Dir/File name including extension). M+1.- 0x00 (hex) NULL ascii(end of NEW name).
SMART GPU 2 3.5” TOUCH Command Set Rename + Move Examples: Example 1: <46,4D,30,3A,2F,46,6F,6C,64,65,72,31,2F,46,6F,6C, 64,65,72,32,00,30,3A,2F,46,6F,6C,64,65,72,58,00> Rename and Move a directory and its contents from “0:/Folder1/Folder2” to “0:/FolderX” path. Example 2: <46,4D,30,3A,2F,31,32,33,2E,74,78,74,00,30,3A,2F, 46,6F,6C,64,65,72,2F,34,35,36,2E,74,78,74,00> Rename and Move a File from “0:/123.txt” to “0:/Folder/456.txt” path. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.9.16 Set/Get Time and Date Dir/File –54hex – ‘T’ ascii *This command is divided in 2 sub-commands, each one is explained next: Commands (host) X bytes Set Dir/File Time and Date: 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x54 (hex), T (ascii). (Dir/File Time & Date) 3.- 0x53 (hex), S (ascii). (Set) 4.- Hours 0-23(dec). 5.- Minutes 0-59(dec). 6.- Seconds 0-59(dec). 7.- Day 1-31(dec). 8.- Month 1-12(dec). 9.- Year upper byte 1980-2107(dec). 10.
SMART GPU 2 3.5” TOUCH Command Set FAT commands time and date related functions uses the RTC Real Time Clock data to correctly set timestamps, if this is needed, the RTC must be enabled prior to execute those FAT functions. Example (sent commands) and received Example 1: <46,54,53,11,1E,14,13,03,07,DD,31,32,33,2E, 74,78,74,00> 00,4F - Set Time “17:30:20” and Date “19 March 2013”, to the File “123.txt”.
SMART GPU 2 3.5” TOUCH Command Set 2.9.17 Get Dir/File Info –49hex – ‘I’ ascii *This command is divided in 2 sub-commands, each one is explained next: Commands (host) 3 bytes + Dir or File name with “.ext” + 1byte(NULL). 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x49 (hex), I (ascii). (Dir/File Info) 3.- 0x53 (hex), S (ascii). Size or 0x46 (hex), F (ascii). FAT Attribute 4 up to N (Dir/File name including extension). N+1.- 0x00 (hex) NULL ascii. Responses (device) X bytes Get Dir/File Size: 1.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <46,49,53,41,42,43,2E,74,78,74,00> 00,45,87,AB,00,4F - Get Size of File “ABC.txt”, obtained file size is 4556715(dec) bytes ~ 4.5Mb. Example 3: <46,49,46,31,32,33,2E,74,78,74,00> 21,00,4F - Get FAT Attribute of File “123.txt”, obtained Attribute is 0x21(hex), the logical OR of 0x20 Archive and 0x01 Read only, so the file is a Read-only Archive. Example 4: <46,49,46,31,32,33,2E,74,78,74,00> 23,00,4F - Get FAT Attribute of File “123.
SMART GPU 2 3.5” TOUCH Command Set 2.9.18 Get Free and Total Space –46hex – ‘F’ ascii Commands (host) 2 bytes 1.- 0x46 (hex), F (ascii). *FAT command. 2.- 0x46 (hex), F (ascii). (Free and Total Space) Responses (device) 10 bytes Free Space: 1.- Size in Kb high byte. 2.- Size in Kb medium high byte. 3.- Size in Kb medium low byte. 4.- Size in Kb low byte. Total Space: 5.- Size in Kb high byte. 6.- Size in Kb medium high byte. 7.- Size in Kb medium low byte. 8.- Size in Kb low byte. ACKs: 9.
SMART GPU 2 3.5” TOUCH Command Set 2.10 RTC Real Time Clock Commands The new Smart GPU 2 includes an embedded RTC Real Time Clock to support full Time-Date calendar functions, also Data Logger applications that require a precise timestamp. The real-time clock is an independent timer that counts every second and keeps information about date(day, month, year) and time(hours, minutes, seconds). The next RTC Timer Functions enable full possibilities with the Smart GPU 2, as it is now more complete than ever.
SMART GPU 2 3.5” TOUCH Command Set 2.10.1 RTC Setup –53hex – ‘S’ ascii Commands (host) 2 bytes 1.- 0x52 (hex), R (ascii). *RTC command. 2.- 0x53 (hex), S (ascii). Responses (device) 2 bytes 1.- RTC State: 0x00 Stopped or 0x01 Configured and Running. 2.- 0x4F (hex), O (ascii) – success ACK. 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) and received Example 1: <52,53> 00,4F – Setup RTC, obtained data is 0x00(stopped), the RTC couldn’t be initialized due to lack of 32.768Khz crystal. Example 2: <52,53> 01,4F – Setup RTC, obtained data is 0x01(running), the RTC is setup and running. Example 3: <52,53> 01,4F – Try to Setup an already initialized RTC, obtained data is 0x01(running), the RTC is already running. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.10.2 RTC Set/Get Time and Date –50hex – ‘P’ ascii *This command is divided in 2 sub-commands, each one is explained next: Commands (host) X bytes Set RTC Time and Date: 1.- 0x52 (hex), R (ascii). *RTC command. 2.- 0x50 (hex), P (ascii). (RTC Parameters) 3.- 0x53 (hex), S (ascii). (Set) 4.- Hours 0-23(dec). 5.- Minutes 0-59(dec). 6.- Seconds 0-59(dec). 7.- Day 1-31(dec). 8.- Month 1-12(dec). 9.- Year upper byte 1980-2107(dec). 10.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) and received Example 1: <52,50,53,11,05,0A,13,03,07,DD> 4F - Set Time “17:05:10” and Date “19 March 2013”, to the RTC data/current Time and Date. Example 2: <52,50,47> 11,05,0A,13,03,07,DD,4F – Get current RTC Time and Date, obtained RTC data is “17:05:10” and Date “19 March 2013”. All data is in hex.
SMART GPU 2 3.5” TOUCH Command Set 2.11 EEPROM-FLASH Commands The Smart GPU 2 includes an embedded EEPROM like-FLASH 16Kb storage, this is mapped as 8 Pages of 2048 bytes, this EEPROM-FLASH is useful to store nonvolatile data when an application require to maintain data even if power is removed from the system.
SMART GPU 2 3.5” TOUCH Command Set Briefly Summary of Commands in this section: *All of Those next commands always begin with the byte ‘E’-45hex, as they are EEPROM-FLASH commands, followed by the next parameters/bytes.
SMART GPU 2 3.5” TOUCH Command Set 2.11.1 Init/Clear EEPROM Buffer –49hex – ‘I’ ascii Commands (host) 2 bytes 1.- 0x45 (hex), E (ascii). *EEPROM command. 2.- 0x49 (hex), I (ascii). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. This command Initializes to 0xFFs all the EEPROM RAM Buffer 2048bytes.
SMART GPU 2 3.5” TOUCH Command Set 2.11.2 Read Bytes From EEPROM Buffer –52hex – ‘R’ ascii Commands (host) 6 bytes 1.- 0x45 (hex), E (ascii). *EEPROM command. 2.- 0x52 (hex), R (ascii). 3.- EEPROM RAM Buffer Address High Byte. 4.- EEPROM RAM Buffer Address Low Byte. 5.- Bytes To Read High Byte. 6.- Bytes To Read Low Byte. Responses (device) DRB(N bytes) + SRB(2 bytes) + ACK/NAK(1 byte). 1-N.- DRB(Data Read Bytes). N+1.-SRB(Successfully Read Bytes) High byte N+2.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) and received Example 1: <45,52,00,00,00,0A> (10 Bytes Data),00,0A,4F – Read 10(dec) Bytes of EEPROM RAM Buffer Data starting from Address 0(dec). Example 2: <45,52,00,0A,00,32> (50 Bytes Data),00,32,4F – Read 50(dec) Bytes of EEPROM RAM Buffer Data starting from Address 10(dec).
SMART GPU 2 3.5” TOUCH Command Set 2.11.3 Write Bytes to EEPROM Buffer –57hex – ‘W’ ascii Commands (host) 6 bytes + N bytes: Bytes To Write 1.- 0x45 (hex), E (ascii). *EEPROM command. 2.- 0x57 (hex), W (ascii). 3.- EEPROM RAM Buffer Address High Byte. 4.- EEPROM RAM Buffer Address Low Byte. 5.- Bytes To Write High Byte. 6.- Bytes To Write Low Byte. 7-N – Data Bytes. Responses (device) SWB(2 bytes) + ACK/NAK(1 byte). 1.-SWB(Successfully Written Bytes) High byte. 2.
SMART GPU 2 3.5” TOUCH Command Set 2.11.4 Fill Buffer with EEPROM Page# –46hex – ‘F’ ascii Commands (host) 3 bytes 1.- 0x45 (hex), E (ascii). *EEPROM command. 2.- 0x46 (hex), F (ascii). 3.- EEPROM Page #(number). Responses (device) 1 byte 1.-0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This Command Fills all the EEPROM RAM Buffer 2048 bytes with the contents of a received EEPROM Page Number(2048 bytes).
SMART GPU 2 3.5” TOUCH Command Set 2.11.5 Save Buffer to EEPROM Page# –53hex – ‘S’ ascii Commands (host) 3 bytes 1.- 0x45 (hex), E (ascii). *EEPROM command. 2.- 0x53 (hex), S (ascii). 3.- EEPROM Page #(number). Responses (device) 1 byte 1.-0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This Command Saves all the current contents of EEPROM RAM Buffer 2048 bytes to the received EEPROM Page Number(2048 bytes).
SMART GPU 2 3.5” TOUCH Command Set 2.11.6 Erase EEPROM Page# –45hex – ‘E’ ascii Commands (host) 3 bytes 1.- 0x45 (hex), E (ascii). *EEPROM command. 2.- 0x45 (hex), E (ascii). 3.- EEPROM Page #(number). Responses (device) 1 byte 1.-0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK. Description This Command Simply Erases all contents of the received EEPROM Page Number(2048 bytes), Note that Erased contents of an EEPROM Page are 0xFFs.
SMART GPU 2 3.5” TOUCH Command Set 2.11.7 Compare Buffer to EEPROM Page# –43hex – ‘C’ ascii Commands (host) 3 bytes 1.- 0x45 (hex), E (ascii). *EEPROM command. 2.- 0x43((hex), C (ascii). 3.- EEPROM Page #(number). Responses (device) 1 byte Result + 1 byte ACK/NAK 1.- 0x00-Contents Differ or 0x01-Contents are Equal. 2.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set 2.12 OBJECTS Commands The Smart GPU 2 integrates a series of hardware drawing assisted objects, those objects help user to create easy GUI controls like Scroll Bars, Progress Bars, Buttons, etc. The next objects are currently supported: -Checkbox. -Button with or without text. -Binary Switch ON/OFF. -Progress Bar with text indicator. -Scroll Bar with steps. -Sliders Vertical and Horizontal. -Windows with X(close) button and text.
SMART GPU 2 3.5” TOUCH Command Set 2.12.1 Object Checkbox –43hex – ‘C’ ascii Commands (host) 9 bytes 1.- 0x4F (hex), O (ascii). *OBJECT command. 2.- 0x43((hex), C (ascii). 3.- X coord high byte. 4.- X coord low byte. 5.- Y coord high byte. 6.- Y coord low byte. 7.- Checkbox Size high byte. 8.- Checkbox Size low byte. 9.- Active State (check/un-check). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <4F,43,00,0A,00,05,00,64,01> Create a checkbox (checked) of size 100(dec)x100(dec), starting on the top left corner X:10(dec), Y:5(dec). All data is in hex. Note: Maximum X or Y acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.12.2 Object Button –42hex – ‘B’ ascii Commands (host) 11 bytes + Text on Button + 1byte(NULL) 1.- 0x4F (hex), O (ascii). *OBJECT command. 2.- 0x42((hex), B (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. 11.- Active State (selected/un-selected). 12 – N.- Button Text N+1.- 0x00(hex) NULL character.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <4F,42,00,0A,00,14,00,C8,00,64,00,54,65,78,74,00> Draw a Unselected(0x00) button with the coordinates: X1:10(dec), Y1:20(dec), X2:200(dec), Y2:100(dec), and the word “Text” inside. Example 3: <4F,42,00,0A,00,14,00,C8,00,64,01,00> Draw a Selected(0x01) button with the coordinates: X1:10(dec), Y1:20(dec), X2:200(dec), Y2:100(dec), without any word or text inside. All data is in hex. Note: Maximum X or Y acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.12.3 Object Switch –54hex – ‘T’ ascii Commands (host) 9 bytes 1.- 0x4F (hex), O (ascii). *OBJECT command. 2.- 0x54((hex), T (ascii). 3.- X coord high byte. 4.- X coord low byte. 5.- Y coord high byte. 6.- Y coord low byte. 7.- Switch Size high byte. 8.- Switch Size low byte. 9.- Active State (On/Off). Responses (device) 1 byte 1.- 0x4F (hex), O (ascii) – success ACK or 0x46 (hex), F (ascii) – fail NAK.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <4F,54,00,0A,00,0A,00,64,01> Draw an On(0x01) state Switch object starting at the top left corner: X:10(dec), Y:10(dec). All data is in hex. Note: Maximum X or Y acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.12.4 Object Progress Bar –50hex – ‘P’ ascii Commands (host) 11 bytes 1.- 0x4F (hex), O (ascii). *OBJECT command. 2.- 0x50((hex), P (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. 11.- Progress/Percentage 0x00(hex) – 0x64(hex). Responses (device) 1 byte 1.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <4F,50,00,0A,00,0A,00,C8,00,64,50> Draw a Progress Bar object with the coordinates: X1:10(dec), Y1:10(dec), X2:200(dec), Y2:100(dec), and 80(dec) as Progress/Percentage. All data is in hex. Note: Maximum X or Y acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.12.5 Object Scroll Bar –53hex – ‘S’ ascii Commands (host) 14 bytes 1.- 0x4F (hex), O (ascii). *OBJECT command. 2.- 0x53((hex), S (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. 11.- Bar Position (must be < Divisions). 12.- Divisions. 13.- Orientation: 0x00-Horizontal or 0x01-Vertical. 14.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <4F,53,00,00,00,00,00,70,00,A0,01,02,01,01> Draw a Vertical(0x01), Selected(0x01) Scroll Bar object with the coordinates: X1:0(dec), Y1:0(dec), X2:112(dec), Y2:160(dec), Bar Position:1(dec), Divisions:2(dec). All data is in hex. Note: Maximum X or Y acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.12.6 Object Slider –4Chex – ‘L’ ascii Commands (host) 13 bytes 1.- 0x4F (hex), O (ascii). *OBJECT command. 2.- 0x4C((hex), L (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. 11.- Slider Position (must be < Divisions). 12.- Divisions. 13.- Orientation: 0x00-Horizontal or 0x01-Vertical. Responses (device) 1 byte 1.
SMART GPU 2 3.5” TOUCH Command Set Example 2: <4F,4C,00,0A,00,0A,00,40,00,A0,04,0A,01> Draw a Vertical(0x01), Slider object with the coordinates: X1:10(dec), Y1:10(dec), X2:64(dec), Y2:160(dec), Slider Position:4(dec), Divisions:10(dec). All data is in hex. Note: Maximum X or Y acceptable size values depend on display orientation.
SMART GPU 2 3.5” TOUCH Command Set 2.12.7 Object Window –57hex – ‘W’ ascii Commands (host) 12 bytes + Window Text + 1byte(NULL) 1.- 0x4F (hex), O (ascii). *OBJECT command. 2.- 0x57((hex), W (ascii). 3.- X1 coord high byte. 4.- X1 coord low byte. 5.- Y1 coord high byte. 6.- Y1 coord low byte. 7.- X2 coord high byte. 8.- X2 coord low byte. 9.- Y2 coord high byte. 10.- Y2 coord low byte. 11.- Window Font Size 12.
SMART GPU 2 3.5” TOUCH Command Set Example (sent commands) Example 1: <4F,57,00,0A,00,0A,01,20,00,A0,02,02,57,69,6E,64, 6F,77,00> Draw a Selected header with Gray center(0x02) Window object with the coordinates: X1:10(dec), Y1:10(dec), X2:288(dec), Y2:160(dec), and the word “Window” with font 2(dec) as header text.
SMART GPU 2 3.5” TOUCH Command Set Example 3: <4F,57,00,0A,00,0A,01,20,00,A0,02,01,57,69,6E,64, 6F,77,00> Draw a Selected header with Transparent center(0x01) Window object with the coordinates: X1:10(dec), Y1:10(dec), X2:288(dec), Y2:160(dec), and the word “Window” with font 2(dec) as header text.(this kind of transparent window is used when window center data needs to be kept and not overwritten).
SMART GPU 2 3.5” TOUCH Command Set 3 Development software tools In order to make even easier the learning about how to communicate with the SmartGPU 2 processor, FREE software could be downloaded and used in any PC. This software simulates most of the functions of the SmartGPU 2 chip by connecting it to the PC through the USB-UART SX Bridge, this connection enables real live graphics processing.
SMART GPU 2 3.5” TOUCH Command Set VIZIC TECHNOLOGIES. COPYRIGHT 2013. THE DATASHEETS AND SOFTWARE ARE PROVIDED "AS IS." VIZIC EXPRESSLY DISCLAIM ANY WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT.
SMART GPU 2 3.5” TOUCH Command Set In no event shall Vizic be liable to the buyer or to any third party for any indirect, incidental, special, consequential, punitive or exemplary damages (including without limitation lost profits, lost savings, or loss of business opportunity) arising out of or relating to any product or service provided or to be provided by Vizic Tech, or the use or inability to use the same, even if Vizic has been advised of the possibility of such damages.