Troubleshooting PJRC Touch Screen with Teensy 3.2

Status
Not open for further replies.

JoshBeckmann

New member
Hello,
I'm having difficulty getting my teensy and the pjrc touch screen (2.8 inch) to work. I have no problems getting the screen to display, but I haven't had any luck with the touch programs (touchpaint and on/off button). I'm using the example code provided as part of the ILI9341_t3 library, but I'll post it here in case it's useful. I've also had the same issues with a different 2.8in touch screen and a different teensy 3.2 (programmed with the example code). I've wired the display as instructed here: https://www.pjrc.com/store/display_ili9341_touch.html When it didn't work the first time I rewired it completely, so shorts and mismatched wiring seems somewhat unlikely.

Any help would be greatly appreciated!

Thanks,
Josh

View attachment touchpaint.txt
View attachment onoffbutton.txt
 
This is likely the problem:

Code:
// The STMPE610 uses hardware SPI on the shield, and #8
#define STMPE_CS 8
Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);

The touchscreen controller on these displays is XPT2046. You need to use the XPT2046_Touchscreen library to access it.
 
Last edited:
You can find display-only and touch-only examples in File > Examples > ILI9341_t3 and File > Examples > XPT2046_Touchscreen.

Might be worthwhile running those examples to test each part of the display separately.

If all else files, show us some photos of the actual wiring. Simple misunderstandings are incredibly common. If you look over prior threads, we're usually pretty good at spotting wiring issues when photos are shared.
 
Beautiful. Examples in XPT2046_Touchscreen worked. Thank you for your prompt, clear, and helpful response. And for making such a useful product, Paul.
 
Not sure if this should be a new post, but I thought it was related enough. I also have a few 2.4in displays with the exact same pin outs and the same driver chip (XPT2046 1528). I tried a pin for pin replacement and used the same software, but had no luck with the touch function. The display worked fine. I tried two of them. Any thoughts? Happy to send pictures if it's useful. Thanks again.
 
Any thoughts?

I'd guess either a wiring mistake or a display without the touch screen installed (easy to spot by looking for the 4 extra wires).

Less likely would be bad hardware. But I can tell you we usually do find 1 to 5 bad displays in every batch of 100-200 from China, though the most common "fail" is a scratch or other cosmetic damage.
 
Status
Not open for further replies.
Back
Top