Hi all;
Having worked though the serial graphic and text commands, I am now looking at the Touch Screen.
I understand the 3 commands which are used with the touch screen, however I am a bit confused as to how to implement it with a microcontroller.
Also the Get Touch Coordinates is a bit confusing, it has Wait For... modes, does this mean that if you send this command it will not reply with anything until a touch is detected ?? - will it never timeout ?
Is this the typical method of implementation:
1) Enable TS
2) Define Area if required
3) Send Wait Until Touch
4) Wait for ACK (when the screen is touched or timeout)
5) Send Get Touch Coordinates
6) Do something with coordinates.
This would mean that the micro would either need to be frozen waiting for the ACK to happen, or it would need to be able to read the ack using an interrupt routine.
Or do you instead need to execute the Get Touch Coordinates command twice, once for the Wait for Touch (mode 0-3) and a second time to get the coordinates (4 & 5) after the touch ??
I'm sure that this is clear to everyone else, guess I'm just not very bright :-)
Having worked though the serial graphic and text commands, I am now looking at the Touch Screen.
I understand the 3 commands which are used with the touch screen, however I am a bit confused as to how to implement it with a microcontroller.
Also the Get Touch Coordinates is a bit confusing, it has Wait For... modes, does this mean that if you send this command it will not reply with anything until a touch is detected ?? - will it never timeout ?
Is this the typical method of implementation:
1) Enable TS
2) Define Area if required
3) Send Wait Until Touch
4) Wait for ACK (when the screen is touched or timeout)
5) Send Get Touch Coordinates
6) Do something with coordinates.
This would mean that the micro would either need to be frozen waiting for the ACK to happen, or it would need to be able to read the ack using an interrupt routine.
Or do you instead need to execute the Get Touch Coordinates command twice, once for the Wait for Touch (mode 0-3) and a second time to get the coordinates (4 & 5) after the touch ??
I'm sure that this is clear to everyone else, guess I'm just not very bright :-)
Comment