nopnop2002 / Raspberry-ili9340spi

ILI9340 SPI TFT Library & XPT2046 Touch Screen Library for Raspberry
MIT License
39 stars 16 forks source link

PEN IRQ not responding #26

Closed d0n13 closed 2 years ago

d0n13 commented 2 years ago

Values are not updating with touch. When I remove pin 14 (IRQ) on display side the values update but only X. Y seems to be stuck close to 32768 so all bits on likely. Is it likely I have a fault touch panel or chip? Wired as per your example setup.

The screen works ok though.

nopnop2002 commented 2 years ago

There is a TFT equipped with HR2046. XPT2046 and HR2046 are very similar. But HR2046 does not work properly. You can tell the difference by reading the chip markings.

d0n13 commented 2 years ago

Yea. I checked that. The chip is a xpt2046

nopnop2002 commented 2 years ago

I would like to see this result.

cc -o xpt xpt.c xpt2046.c -lbcm2835   
sudo ./xpt
d0n13 commented 2 years ago

There is no output until I pull out pin 14 (IRQ) to force it low. They I get the output below. I compiled with the debug flag on.

Put a scope on pin 14 too but it doesn't do anything when I touch screen. It just stays at 3.3v.

$ sudo ./xpt
rbuf[0]=00 rbuf[1]=00 rbuf[2]=00
rbuf[0]=00 rbuf[1]=7f rbuf[2]=f8
touch !! x=    0 y= 2047rbuf[0]=00 rbuf[1]=47 rbuf[2]=a8
rbuf[0]=00 rbuf[1]=7f rbuf[2]=f8
touch !! x= 1146 y= 2047rbuf[0]=00 rbuf[1]=5a rbuf[2]=a0
rbuf[0]=00 rbuf[1]=76 rbuf[2]=30

Just wondering if it's a software issue where some workaround might fix or the XPT chip is faulty...

d0n13 commented 2 years ago

C090A364-9960-4659-8DE6-A7EB7294A67D

nopnop2002 commented 2 years ago

There is no output until I pull out pin 14 (IRQ) to force it low.

XPT2046 soldering may be incomplete.

d0n13 commented 2 years ago

XPT2046 soldering may be incomplete.

Looks OK. It could be a faulty chip too. I'll take a chance and get another one and see how it goes.