Component: Touch Screen (Resistive) (Graphical Library): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 62: | Line 62: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Calibrate''' | ||
|- | |- | ||
| colspan="2" | Performs a calibration routine which draws a circle at the top left of the screen followed by the bottom right of the screen, from these coordinates the component can work out the corresponding X,Y pixel coordinate. | | colspan="2" | Performs a calibration routine which draws a circle at the top left of the screen followed by the bottom right of the screen, from these coordinates the component can work out the corresponding X,Y pixel coordinate. | ||
| Line 86: | Line 86: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetCalibrationValues''' | ||
|- | |- | ||
| colspan="2" | Returns one of five calibration values used to configure the touchscreen. Populated automatically after running the calibration macro. Allows calibration data to be retrieved and stored into EEPROM by the user. | | colspan="2" | Returns one of five calibration values used to configure the touchscreen. Populated automatically after running the calibration macro. Allows calibration data to be retrieved and stored into EEPROM by the user. | ||
| Line 105: | Line 105: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetCoord''' | ||
|- | |- | ||
| colspan="2" | Gets the coordinate from the last valid touch event | | colspan="2" | Gets the coordinate from the last valid touch event | ||
| Line 124: | Line 124: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''IsTouched''' | ||
|- | |- | ||
| colspan="2" | Check to see if display has been touched | | colspan="2" | Check to see if display has been touched | ||
| Line 138: | Line 138: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetCalibrationValues''' | ||
|- | |- | ||
| colspan="2" | Sets the calibration values used to configure the touchscreen. Allows the touchscreen to be re-calibrated from EE memory after a power cycle without re-running the calibration macro. | | colspan="2" | Sets the calibration values used to configure the touchscreen. Allows the touchscreen to be re-calibrated from EE memory after a power cycle without re-running the calibration macro. | ||
| Line 177: | Line 177: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetOrientation''' | ||
|- | |- | ||
| colspan="2" | Sets the orientation of the touchscreen to match the orientation of the graphical display. | | colspan="2" | Sets the orientation of the touchscreen to match the orientation of the graphical display. | ||
| Line 197: | Line 197: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 206: | Line 206: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 240: | Line 240: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Configuration | ||
|- | |- | ||
|- | |- | ||
| Line 279: | Line 279: | ||
| colspan="2" | Microsecond delay in between each of the averaged samples. | | colspan="2" | Microsecond delay in between each of the averaged samples. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | ADC options | ||
|- | |- | ||
|- | |- | ||
| Line 298: | Line 298: | ||
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. | | colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | Graphical Library |
Touch Screen (Resistive) component
Routines for reading a simple resistive touch screen directly without interface IC.
Version information
Library Version, Component Version, Date, Author, Info 9, 1.0, 26-07-24, BR, Renamed component to match other touchscreen components
Detailed description
No detailed description exists yet for this component
Examples
An example of how to calibrate and read a resistive touch display overlay using the component.
Calibration is stored into EEPROM memory so as to avoid having to repeat it on every power up.
Macro reference
Calibrate
GetCalibrationValues
GetCoord
| GetCoord | |
| Gets the coordinate from the last valid touch event | |
| Index | |
| 0=X, 1=Y | |
| Return | |
IsTouched
| IsTouched | |
| Check to see if display has been touched | |
| Return | |
SetCalibrationValues
SetOrientation
| SetOrientation | |
| Sets the orientation of the touchscreen to match the orientation of the graphical display. | |
| Orientation | |
| Range: 0-3 default = 0 | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_TouchScreen_Resistive.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_TouchScreen_Resistive.fcfx