-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
( Touch Issue ILI9341 ) RawZ always returns 4095 #1685
Comments
Hi, I have to correct myself. The problem not occures "all of a sudden"! Best regards, |
The test touch controller sketch will need to be modified if other SPI peripherals are on the bus. I am not sure what the root cause is. It is important to set the chip select pins of all SPI devices high at the start of setup() so then bus conflicts do not occur during the sequential initialisation. GPIO pins float to undefined levels when the pin has not been configured, many support boards do not prevent this by installing a pull up resistor. It could be that the touch controller needs a lower clock rate. Long wires can also cause problems, poor 0V connection as well. Unfortunately it is difficult to advise in these situations. |
The linked issue is for particular ILI9488 and ST7796 boards, so I would not expect those conditions to apply in your case. |
The 4095 falue is the 12 bit touch reading being all 1's ie 0xFFF this typically indicates the touch controller is not driving the SPI bus. You could add a 1K pull down resistor to the touch controler output pin (typically called TDO) and then the value will be 0. I have had many displays delivered from China and only had 2 bad one (cracked screens refunded for those) and one with a duff touch controller (suspect the ribbon under the display may be damaged but will likely damage the TFT if I try to lift it). Personally I do not like the resistive touch screen as they are not very accurate and get scratched easily if a stylus is used. Having said that the library should work. These displays are quite robust against anti-static damage too and take a fair bit of breadboarding abuse. They don't like 5V for long though .Most are fitted with a regulator 5V to 3.3V, that is U1 on your display. The connections and configuration (wrong display driver assumed) are where most folk go wrong even though they have checked a hundred times! Sometimes it takes the use of test equipement like an oscilloscope figure out whats going on. Ther are some rare versions of the library that maybe had a touch bug, but since you had it working that is unlikely to be the cause. |
Strange thing: pulling down T_DO to GND does not change anything. The reading stays at 4095. The reading does never differ from 4095 even not by 1 or 2. Tomorrow the new one will arrive - I will report what happens with this one. // Edit x: 2051 y: 1675 z: 2634 => touched So the touch recognizing seems to work correctly but the x-y are jumping untouched randomly? This is reproducible. // Edit2 Thank you. Best regards, |
Hi, Thanks all for the time and help! |
Same issue, but removing MISO pin solve the problem. |
@garudaonekh The problem display in the OP is an ILI9341 which are OK to connect MISO. The displays that are troublesome are documented here: |
Thanks a lot @garudaonekh ! lost 4 hours to figure out why it doesnt work and read your POST! double check in the freetouchDeck : MISO pin is NOT connected to TFT, only with TDO of the Touchscreen!!! thanks! |
Hi,
I'm using an "ILI9341" (the second one now) and all of a suden the touch of them doesn't work anymore.
Calibration "magically" touches itself and the "Test_Touch_Controller.ino" reports:
...
x: 0 y: 0 z: 4095
x: 0 y: 0 z: 4095
x: 0 y: 0 z: 4095
...
looks to me like fully touched (or even not connected at all?).
The strange thing - if I order and connetct a new display (second time until now) everything works at the beginning (rawZ reports reading between 10-20 untouched). All of a suddon after 2-3 days the rawZ readings are 4095.
My setup:
AZ-Delivery ESP32 Dev Kit C V4
"Setup1_ILI9341.h":
#define ILI9341_DRIVER
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 20000000
#define SPI_TOUCH_FREQUENCY 2500000
"User_Setup_Select.h":
#include <User_Setups/Setup1_ILI9341.h>
"User_Setup.h":
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 15
#define TFT_DC 2
#define TFT_RST 4
#define TOUCH_CS 17 (I have tried other ones like 16 already - same result)
Could it be, that these displays are all "crap" and died after some days ot is there anything that could be wrong from my side.
Could I do some more tests to figure out where these "4095"-readings are comming from?
Thank you!
BR,
FFNB
The text was updated successfully, but these errors were encountered: