XPT2046 touch with parallel display? #895
-
I have a 3.95" , 480x320 Arduino shield that has an ST7796 & XPT2046. According to the readme in the library, I understand an SPI touch controller is not supported for parallel displays. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi, the "XPT2046_Touchscreen" librbray will work if you use the standard SPI pins, which on an ESP32 are pins 19 (MISO->T_DO), 23 (MOSI->T_DIN), 18 (SCK->T_CLK), you can then choose your own pin for the T_CS line. I have not tried it with the interrupt pin and that may not work with the ESP32. Here is an example that works with TFT_eSPI:
|
Beta Was this translation helpful? Give feedback.
-
The "XPT2046_Calibrated" library also works. Example for TFT_eSPI:
|
Beta Was this translation helpful? Give feedback.
-
I have updated the warning as some ST7796 boards have a diode fitted inline with the chip select (bad design practice!) and this can cause problems. However in your case with a parallel display you will not encounter this. |
Beta Was this translation helpful? Give feedback.
Hi, the "XPT2046_Touchscreen" librbray will work if you use the standard SPI pins, which on an ESP32 are pins 19 (MISO->T_DO), 23 (MOSI->T_DIN), 18 (SCK->T_CLK), you can then choose your own pin for the T_CS line. I have not tried it with the interrupt pin and that may not work with the ESP32. Here is an example that works with TFT_eSPI: