2.4" Color TFT Touchscreen Breakout, Issues with Nano 33 IOT

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
crashmeplease
 
Posts: 3
Joined: Wed Apr 27, 2022 5:23 am

2.4" Color TFT Touchscreen Breakout, Issues with Nano 33 IOT

Post by crashmeplease »

Hi, I have an Adafruit 2.4" Color TFT Touchscreen Breakout (https://www.adafruit.com/product/2478)

It works great when testing with an Arduino Uno, tried both graphics test and touchscreen test in SPI mode no issues.

However when testing on an Arduino Nano 33 IOT board in SPI mode, the graphics test works, but I am having issues with the touchscreen test. The touch is not as fluid (see image - touch is dotty, no straight lines) and only registers within the centre of the screen. (can't select colours for example). I have not tested the SD card part yet.

I have reconnected the screen several times to ensure correct pinout, and changed YM to pin 5 and XP to pin 4 (same as I did in Uno test).
I checked the resistance across X (~280R) and adjusted the example but no change.

I am hoping it is just a library limitation with the new board and not something stupid that I have done.

(tft)
D13 > CLK
D12 > MISO
D11 > MOSI
D10 > CS
D9 > D/C

(touch)
A2 > Y+
A3 > X-
D5 > Y-
D4 > X+

Any suggestions appreciated.
Attachments
Touch Output on Nano 33 IOT
Touch Output on Nano 33 IOT
tft.jpg (185.12 KiB) Viewed 162 times

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: 2.4" Color TFT Touchscreen Breakout, Issues with Nano 33

Post by adafruit_support_carter »

In the touchpaint example code:
https://github.com/adafruit/Adafruit_IL ... hpaint.ino
you can adjust the screen touch overlay limits here:

Code: Select all

// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 150
#define TS_MINY 130
#define TS_MAXX 3800
#define TS_MAXY 4000

No lines are ever drawn. The program just constantly draws dots at the sensed touch location. It sounds like it's running slower on the Nano 33 IOT than on the UNO, which doesn't make sense.

You've made the conversion to SPI by soldering the jumpers?
https://learn.adafruit.com/adafruit-2-4 ... iring-test

And the touchpaint program you are running is the same one linked above?

User avatar
crashmeplease
 
Posts: 3
Joined: Wed Apr 27, 2022 5:23 am

Re: 2.4" Color TFT Touchscreen Breakout, Issues with Nano 33

Post by crashmeplease »

Hi,

Just to update, I have also tried the touchscreen on an Arduino Mega now and can confirm this also works as expected, so it is looking increasingly like just an issue with the Nano 33 IOT, either a hardware or software incompatibility. I have not done much else with the Nano yet other than the graphics test which works flawlessly.
adafruit_support_carter wrote:you can adjust the screen touch overlay limits here:
What are viable limits? I have tried a few values down to 10 and up to 1000 but that doesn't have any effect. Also when running the example on other boards the touch works perfectly with default values so I would assume that they would not need to be changed for a different board.

adafruit_support_carter wrote:No lines are ever drawn. The program just constantly draws dots at the sensed touch location. It sounds like it's running slower on the Nano 33 IOT than on the UNO, which doesn't make sense.
Yeah I understand that it is not an actual line drawn, it is just my interpretation of it. On the Uno the points drawn are more frequently and the result is a smoother shape.

adafruit_support_carter wrote:You've made the conversion to SPI by soldering the jumpers?
https://learn.adafruit.com/adafruit-2-4 ... iring-test
Yes the three pins are bridged, as I say the touchscreen is working perfectly on other boards so it is my assumption that this is not an issue.

adafruit_support_carter wrote:And the touchpaint program you are running is the same one linked above?
Almost, I have the breakout version so I am using this example;
https://github.com/adafruit/Adafruit_IL ... hpaint.ino
Which gives me the YP/YM/XP/XM labels to assign the pin numbers.


Thanks

User avatar
adafruit2
 
Posts: 22187
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.4" Color TFT Touchscreen Breakout, Issues with Nano 33

Post by adafruit2 »

you are using hardware SPI right? not software/bitbang SPI?

User avatar
crashmeplease
 
Posts: 3
Joined: Wed Apr 27, 2022 5:23 am

Re: 2.4" Color TFT Touchscreen Breakout, Issues with Nano 33

Post by crashmeplease »

adafruit2 wrote:you are using hardware SPI right? not software/bitbang SPI?
Yes SPI. My thoughts are the display would not function if the connections were not correct.

However the main issue that I am primarily interested in, is the touchscreen component of the module, which is independent of the display itself, and SPI.

I have rechecked the touchscreen connections, tried different pins etc, but still only have limited usability in the centre of the screen with the breakouttouchpaint example. So after a bit more head scratching, I am wondering if the library relies on Analogue 5V which most of the Arduino boards are, such as the Uno and Mega that I tried, but the Nano 33 IOT has Analogue 3V. I will try hooking it up with a basic resistor voltage divider and see if anything changes.

User avatar
adafruit2
 
Posts: 22187
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.4" Color TFT Touchscreen Breakout, Issues with Nano 33

Post by adafruit2 »

ok for the analog readings, uncomment
https://github.com/adafruit/Adafruit_IL ... nt.ino#L81
then open the serial monitor and look for the largest and smallest numbers. that will tell you the mapping numbers - save the minimum and maximum on X and Y

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”