Component: Touch Screen (XPT2046) (Graphical Library)
From Flowcode Help
Jump to navigationJump to search| Author | Matrix Ltd | 
| Version | 13.13 | 
| Category | Graphical Library | 
Contents
Touch Screen (XPT2046) component
Low level routines for controlling or interacting with the XPT2046 touch screen controller IC found on a lot of common low cost resistive touch screen products.
Version information
Library Version, Component Version, Date, Author, Info 12, 1.0, 26-07-24, BR, Removed ghost greay square connection line 13, 13.0, 20-02-25, MW, Sample sensor now retuns the pressure value instead 0 or 1
Detailed description
No detailed description exists yet for this component
Examples
Example using the XPT2046 touchscreen driver IC with a 4.3" TFT Display using the SSD1963 Graphical LCD Controller.
 GLCD 4.3 Touch
GLCD 4.3 Touch
Example using the XPT2046 touchscreen driver IC with a 7" TFT Display using the SSD1963 Graphical LCD Controller.
 GLCD 7 Touch
GLCD 7 Touch
Macro reference
Initialise
|   | Initialise | 
| Activates the SPI peripheral and claims control over the I/O pins. | |
|  - VOID | Return | 
ReadCoord
|   | ReadCoord | 
| Reads a coordinate returned from the Sample Sensor macro. Coordinate is scaled to the X/Y Pixel bounds specified. | |
|  - BYTE | Coordinate | 
| 0 = X, 1 = Y, 2 = Pressure | |
|  - UINT | Return | 
SampleSensor
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_TouchScreen_XPT2046.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_TouchScreen_XPT2046.fcfx








