SmartGPU2-LCD480X320Touch-CommandSet
SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 87
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.
Description
This Command performs a reading on the
touchscreen panel and responds immediately
the current reading in that specific time.
When the command is called and a valid
touch point on the touchscreen is
read/obtained, the SmartGPU 2 will respond
with the X(16bit) and Y(16bit) coordinates of
the touch point followed by an ACK(means
valid touchscreen point).
If during the command call, no valid touch
on the touchscreen panel is present,
SmartGPU 2 will respond X and Y coordinates
as zeros: 00,00,00,00(hex), followed by a
NAK(means no valid touchscreen point and
coordinates values must be discarded).
Unlike other touch devices/systems that
wait until a touchscreen point is obtained,
Smart GPU 2 responses immediately in order
to release the main processor and not freeze
the system with a getchar()/reply loop, this
way the application program can perform other
tasks and ask periodically for a touchscreen
point.
If a simple wait until valid point / touch on
screen is needed, user can call this command
repeatedly until an ACK with valid coordinates
is obtained.