1.8" TFT LCD w/joystick and SD card. white screen

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
asteroide06
 
Posts: 4
Joined: Sat Feb 02, 2013 8:02 am

1.8" TFT LCD w/joystick and SD card. white screen

Post by asteroide06 »

Hello,

I just received an Adafruit shield, Adafruit 1.8" 18-bit Color TFT Shield w/microSD and Joystick, ID 802.
I connect it on an Arduino Mega 2560. As many other users, when upload any of the exanples provided with ADAFRUIT8ST7732 library examples, the screen is always white. The serial monitor shows a normal behavior. I can read the messages, the values of the analog reading with the joystick, etc... I changed the CS value to 10 and DC value to 8, according to the pin numbering on the shield. I double checked the solderings, redid them to make sure they make a good contact. No change.
You can see pictures of the solderings here:
http://www.asteroide06.fr/soldering1.jpg
http://www.asteroide06.fr/soldering2.jpg
They are not perfect (done with a smartphone)

What else can I try ?

Thanks for your help

asteroide06
 
Posts: 4
Joined: Sat Feb 02, 2013 8:02 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by asteroide06 »

Ok, I got the solution. In the examples provided, the sclk and mosi pins must be used too. I first changed only the CS, DC and RST adresses. It's not enough to make it fully functional on an Arduino mega 2560.

For example in graphicstest, the original code is:

Code: Select all

#define sclk 4
#define mosi 5
#define cs   6
#define dc   7
#define rst  8  // you can also connect this to the Arduino reset
To make it work with Arduino mega 2560:

Code: Select all

#define sclk 13
#define mosi 11
#define cs  10
#define dc   8
#define rst -1  // you can also connect this to the Arduino reset
In shieldtest, the original code is:

Code: Select all

#define SD_CS    4  // Chip select line for SD card
#define TFT_CS  10  // Chip select line for TFT display
#define TFT_DC   8  // Data/command line for TFT
#define TFT_RST  -1  // Reset line for TFT (or connect to +5V)
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
To make it work with Arduino mega 2560:

Code: Select all

#define sclk 13
#define mosi 11
#define SD_CS    4  // Chip select line for SD card
#define TFT_CS  10  // Chip select line for TFT display
#define TFT_DC   8  // Data/command line for TFT
#define TFT_RST  -1  // Reset line for TFT (or connect to +5V)
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, mosi, sclk, TFT_RST);
Hope this helps.

User avatar
dmpyron
 
Posts: 75
Joined: Mon Dec 10, 2012 11:14 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by dmpyron »

Thanks for doing my research! :D Now I won't wander around trying to figure what little thing I've done wrong.

User avatar
technerdchris
 
Posts: 46
Joined: Sun Nov 25, 2012 4:08 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by technerdchris »

Thank you so much!

Adafruit, please put something somewhere in the description about Mega people seeing this thread. :D

Yaaay, now I can get back to trying to use this to control my test bench... AND get a graph readout!

Thanks,
Chris
Last edited by technerdchris on Fri Nov 01, 2013 3:25 am, edited 1 time in total.

User avatar
technerdchris
 
Posts: 46
Joined: Sun Nov 25, 2012 4:08 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by technerdchris »

these aren't the droids we're looking for, move along...
Last edited by technerdchris on Fri Nov 01, 2013 3:26 am, edited 1 time in total.

User avatar
peony3000
 
Posts: 4
Joined: Wed Apr 17, 2013 3:23 pm

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by peony3000 »

Hi
I'm was getting the white screen with a Arduino Uno
The correct pin assignments are....

Code: Select all

// You can use any (4 or) 5 pins
#define sclk 13
#define mosi 11
#define cs   10
#define dc   8
#define rst  -1  // you can also connect this to the Arduino reset
Andy

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by adafruit_support_mike »

This is an issue we started seeing with a small number of TFT shields after pburgess, our blinky-stuff guru, optimized the library. Unfortunately, it hits so rarely that he hasn't been able to replicate the issue and fix it.

Try using this version of the library: https://github.com/adafruit/TFTLCD-Libr ... 5263787d1f

User avatar
technerdchris
 
Posts: 46
Joined: Sun Nov 25, 2012 4:08 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by technerdchris »

BTW, to update, I was able to get it working to the point where a joystick move could make words show up on the screen. I forgot exactly what I did, but I recall it was an issue of getting all the pin #s right on my Mega. If someone comes here via google with a Mega and is stuck ,reply and I'll dig up the sketch.

User avatar
v=f lambda
 
Posts: 8
Joined: Fri Dec 06, 2013 9:13 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by v=f lambda »

BTW asteroide06's fix for shield test on the mega also works with the yun. Is there a way of clearing a single line on the screen or clearing the whole screen really fast?
tft.fillScreen(0x0000);
or
tft.fillScreen(ST7735_BLACK);
cause a 2-3 second delay in my sketch and i'm using network time on the yun and would like to be able to do it in under a second

User avatar
technerdchris
 
Posts: 46
Joined: Sun Nov 25, 2012 4:08 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by technerdchris »

You have to manually draw a black box in that area. Or print out " " to cover the space.

When I ported the Adafruit GFX library to work on chipKIT products, I added some features:
1) Current cursor position, so you can save a local variable for the X,Y of text you want to update. Then you have temx and tempy for current cursor position, allowing you to go to the other place, update text, then setcursor back to where it currently is.
2) Actually implemented their "background color" so that when I print text somewhere, it blanks out the background of the character.
3) Text inversion, so that it's easy to invert letters for maximum highlighting and easiest implementation.
... so you can review the changes I made to the GFX.cpp for these simple updates.

Also, the chipKIT uc32 is SO FAST that a fill screen is almost a blink! So you can just buy one of these instead and the Adafruit GFX library I linked to is TURN KEY.

:D Chris

User avatar
v=f lambda
 
Posts: 8
Joined: Fri Dec 06, 2013 9:13 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by v=f lambda »

Thanks;
tft.fillRect(2, 30, 100, 30, ST7735_BLACK);
works a fair bit faster. Its just a lot of playing to get the box the right size and in the right spot.

Thank you for your help

User avatar
technerdchris
 
Posts: 46
Joined: Sun Nov 25, 2012 4:08 am

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by technerdchris »

I use variables for X and Y position. The font sizes are fixed, so you can have #defines for row height and cursor. I did all my computation first then with X,Y at the top, Id do a row of text, increment Y by row height+margin. Thinking back, row height was 8, and I made margin 2.

In doing all that sillyness is why I added the getcursor() method to GFX...

User avatar
RobPod
 
Posts: 12
Joined: Tue Nov 08, 2016 12:18 pm

Re: 1.8" TFT LCD w/joystick and SD card. white screen

Post by RobPod »

I am having the same white screen problem with the TFT with Joystick Shield. The code seems to run fine (I get all the correct responses in the Serial Monitor) but the screen stays white the whole time. I am able to read the joystick correctly and the image loads fine from the SD card but the screen never changes.

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

Return to “Arduino Shields from Adafruit”