Closed d0n13 closed 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.
Yea. I checked that. The chip is a xpt2046
I would like to see this result.
cc -o xpt xpt.c xpt2046.c -lbcm2835
sudo ./xpt
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...
There is no output until I pull out pin 14 (IRQ) to force it low.
XPT2046 soldering may be incomplete.
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.
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.