There are three ways to implement Touch:
- Resistive Panel. Unintelligent.
- Resistive panel with XPT2046 controller chip.
- Capacitive Panel with FT2606 controller chip.
(1) MCU applies voltage across XP, XM pins. Reads analog voltage on YP. Then YP, YM and read analog XM.
(2) Exactly the same procedure but done by the XPT2046. Read result via SPI bus
(3) Not sure exactly how the chip works. Read result via I2C bus.
Method (1) must have YP, XM pins as Analog. The YM, XP can be any digital pins.
The intelligent chips work best if they use the hardware SPI or I2C pins. Most libraries bit-bash SPI on GPIO pins.
David.
Other controller chips are available. They all tend to work the same.