I am using the 2.8" ILI9341 TFT with touchscreen with a Teensy 3.2, both purchased directly from pjrc.com. The TFT works as expected, however the touchscreen will sometimes get stuck in a "self triggering mode" as if there are continual touches near coordinates x = 180 to 225, y = 230 to 255, with z = 2500 to > 3000, as determined from some test code. If I press a finger near the four touchscreen connections at the upper left of the display I can sometimes/usually get the continual touches to stop and the touchscreen will work normally, at least for a while. The display worked fine in my breadboard; however it is now soldered into a PCB prototype so replacement (i.e. trying another TFT) is not easy. Sometimes on power up everything will work just fine. The display was never abused and always handled in a static-safe environment. Details are as follows:
The libraries used are:
Outputs are initialized in Setup:
The program waits for touches as follows:
and everything works fine when the TFT is not in its spastic mode.
Regarding hardware, the TFT interfaces directly to the Teensy 3.2 at 3.3 V I/O. VCC is +5 V, RESET is 3.3 V, both with 0.1 uf decoupling. The Teensy 3.2 is powered from a MC7805 regulator which is battery powered. Good ground planes and decoupling on the PCB. I could include a schematic but there is a lot of other non-germane circuitry (nothing RF, or even AC or switching when the problem occurs).
This certainly seems like an intermittent hardware problem with the display, but since this is my first experience with the Teensy and TFT display I wanted to seek the expertise of this forum.
1. Have others seen similar problems using the ILI9341 TFT with touchscreen?
2. Any hardware recommendations to improve the reliability of the touchscreen?
3. Anything I am overlooking anything before attempting to desolder the display from my PCB?
The libraries used are:
Code:
#include <ILI9341_t3.h>
#include <XPT2046_Calibrated.h>
#include <SPI.h>
Outputs are initialized in Setup:
Code:
pinMode(TFT_CS, OUTPUT); // Set chip selects high for deselect
digitalWrite(TFT_CS, HIGH);
pinMode(TS_CS, OUTPUT);
digitalWrite(TS_CS, HIGH);
pinMode(TFT_DC, OUTPUT);
The program waits for touches as follows:
Code:
while (!ts.touched()) delay(100); // Wait for touch
TS_Point p = ts.getPoint(); // Read touchscreen x, y coordinates and z pressure
and everything works fine when the TFT is not in its spastic mode.
Regarding hardware, the TFT interfaces directly to the Teensy 3.2 at 3.3 V I/O. VCC is +5 V, RESET is 3.3 V, both with 0.1 uf decoupling. The Teensy 3.2 is powered from a MC7805 regulator which is battery powered. Good ground planes and decoupling on the PCB. I could include a schematic but there is a lot of other non-germane circuitry (nothing RF, or even AC or switching when the problem occurs).
This certainly seems like an intermittent hardware problem with the display, but since this is my first experience with the Teensy and TFT display I wanted to seek the expertise of this forum.
1. Have others seen similar problems using the ILI9341 TFT with touchscreen?
2. Any hardware recommendations to improve the reliability of the touchscreen?
3. Anything I am overlooking anything before attempting to desolder the display from my PCB?