Component: Touch Screen (GT911) (Graphical Library): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 101: | Line 101: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Activates the SPI peripheral and claims control over the I/O pins. Returns 1 if device found and communicating. | | colspan="2" | Activates the SPI peripheral and claims control over the I/O pins. Returns 1 if device found and communicating. | ||
| Line 115: | Line 115: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadCoord''' | ||
|- | |- | ||
| colspan="2" | Reads a coordinate returned from the Sample Sensor macro. Coordinate is scaled to the X/Y Pixel bounds specified. | | colspan="2" | Reads a coordinate returned from the Sample Sensor macro. Coordinate is scaled to the X/Y Pixel bounds specified. | ||
| Line 139: | Line 139: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadXBytes''' | ||
|- | |- | ||
| colspan="2" | Reads the specified number of bytes starting at the specified address | | colspan="2" | Reads the specified number of bytes starting at the specified address | ||
| Line 168: | Line 168: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SampleSensor''' | ||
|- | |- | ||
| colspan="2" | Reads the touch controller and returns true if there is currently a touch in progress. The touch coordinates can be read using the ReadCoord macro. Return 0 = No Touch, 1 = Single touch detected, 2 = Two touch points detected | | colspan="2" | Reads the touch controller and returns true if there is currently a touch in progress. The touch coordinates can be read using the ReadCoord macro. Return 0 = No Touch, 1 = Single touch detected, 2 = Two touch points detected | ||
| Line 182: | Line 182: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetOrientation''' | ||
|- | |- | ||
| colspan="2" | Allows the orientation to be overridden. | | colspan="2" | Allows the orientation to be overridden. | ||
| Line 201: | Line 201: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteXBytes''' | ||
|- | |- | ||
| colspan="2" | Writes the specified number of bytes starting at the specified address | | colspan="2" | Writes the specified number of bytes starting at the specified address | ||
| Line 231: | Line 231: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Revision as of 14:23, 13 July 2026
| Author | Matrix Ltd |
| Version | 2.0 |
| Category | Graphical Library |
Touch Screen (GT911) component
Low level routines for controlling or interacting with the GT911 touch screen controller IC found on a lot of common capacitive touch screen products.
Version information
Library Version, Component Version, Date, Author, Info 6, 1.0, 26-07-24, BR, Removed ghost greay square connection line 7, 1.0, 29-08-24, BR, Fixed a problem where the I2C writes were corrupted 8, 1.0, 29-08-24, BR, Added Orientation support 9, 1.0, 29-08-24, BR, Improved Orientation support
Detailed description
No detailed description exists yet for this component
Examples
Macro reference
Initialise
| Initialise | |
| Activates the SPI peripheral and claims control over the I/O pins. Returns 1 if device found and communicating. | |
| Return | |
ReadCoord
ReadXBytes
| ReadXBytes | |
| Reads the specified number of bytes starting at the specified address | |
| Address | |
| Data | |
| NumBytes | |
| Return | |
SampleSensor
SetOrientation
| SetOrientation | |
| Allows the orientation to be overridden. | |
| Orientation | |
| Range: 0 - 3 | |
| Return | |
WriteXBytes
| WriteXBytes | |
| Writes the specified number of bytes starting at the specified address | |
| Address | |
| Data | |
| NumBytes | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_TouchScreen_GT911.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_TouchScreen_GT911.fcfx