Page 1 of 1

xpt2046 read wrong coordinates

Posted: Wed Jan 14, 2026 2:45 pm
by simisv
Hi

I'm trying for first time resistive touch xpt2046 on a ESP32 CYD module using Flowcode 10 . This module was tested using Arduino IDE and is 100% ok .
Display used is 320x240 ili9341 .
Using Flowcode : X axis value is always 0 , y axis value is 39 when there is not touched and 2 to 36 when touched from top(2) to bottom(36) .
I don't know how to move forward in to solving these issue .
Any help much appreciated .
Thank you

Re: xpt2046 read wrong coordinates

Posted: Thu Jan 15, 2026 11:06 am
by BenR
Hello,

Have you tried changing the properties of the XPT2-46 component, e.g. the analogue mode from Differential to Single Ended?

You could also try changing the Channel to Software and see if that makes a difference.

Re: xpt2046 read wrong coordinates

Posted: Thu Jan 15, 2026 10:04 pm
by simisv
Hi

Thank you Ben . You are right . Software SPI solved the problem and changing Analogue Mode to Single Ended . Unfortunately the IRQ pin stopped working so I have to use Pressure data . Pressure data shouldn't it be almost the same over the entire surface of display ?

Thank you for your help
Simion