(→C Source code) |
(→Circuit Schematic) |
||
Line 22: | Line 22: | ||
* Y- is set to 5V: RA1 is output high | * Y- is set to 5V: RA1 is output high | ||
* X- voltage is read by ADC and averaged with X+ value, the result is the raw X coordinate. | * X- voltage is read by ADC and averaged with X+ value, the result is the raw X coordinate. | ||
− | * The same is then done to read the Y coordinate, please see TSlib.c file in .ZIP file | + | * The same is then done to read the Y coordinate, please see TSlib.c file in .ZIP file below. |
X and Y raw coordinates are then adjusted using calibration coordinates to get X and Y coordinates in pixel. | X and Y raw coordinates are then adjusted using calibration coordinates to get X and Y coordinates in pixel. |
Design your own GLCD Touch Clock
Contents |
Let me introduce TouchClock to you with this short video clip :
The idea of this project is to use a graphic LCD with a touchscreen and a built-in sprite editor to design your own clock, and shows how to connect a resistive touchscreen directly to a PIC with no additional hardware.
This project also includes a ready-to use touchscreen library for PIC
This is how to connect the 4-wires resistive touchscreen directly to the PIC :
How the library reads the X raw coordinate of a touch :
X and Y raw coordinates are then adjusted using calibration coordinates to get X and Y coordinates in pixel.
Since this project has multiple source files, source code is not expanded here : please download archive file below.
Download LCDscope-project.ZIP file for mikroC : File:LCDscope-project.zip
Includes :
powered by commenterra | Recent comments |