1.8" 128x160 SPI TFT LCD Display white screen

OK, I have no choice but to ask a question. I've been trying to get this thing to work for 2 days. I've been reading non stop, videos up the ying yang, my favorite vids...30 seconds showing the display work...like 50 of them!

Pro Mini 328 5v: http://www.ebay.com/itm/221402511375?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

1.8" 128*160 SPI TFT LCD Display: http://www.ebay.com/itm/360830297720?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

No matter what sketch I've used I get nothing on the display.

I know the sketch is running because I can see it on the serial monitor.

I have connected the proper SPI pins(8 pins) from the screen to the proper pins on the pro mini as per the sketches.

All I get is a whit screen...no nothing, not a flicker, a dimming, notta!

I did some research before I bought anything and it looks pretty straight forward.

What I want to make is a simple voltmeter to show me the cell voltages of the lipo batteries in my RC airplane. I have 2 cell batteries for my receiver, two in parallel and the same thing for the ignition battery. It will mount in the plane and I want to hit a momentary button and it will show me the cell voltages one at a time.

I can't see just getting an LCD display to work as being mind bending...it's requisite to the whole project.

Is there something hidden in bowls of the internet that I need to know? I'm at my wits end with this.

Here is a classic example of the pin asignments in the regular speed sketch...and yes I have the green plastic tab...changed that.

// For the breakout, you can use any (4 or) 5 pins
#define sclk 4
#define mosi 5
#define cs   6
#define dc   7
#define rst  1  // you can also connect this to the Arduino reset

//Use these pins for the shield!
//#define sclk 13
//#define mosi 11
//#define cs   10
//#define dc   8
//#define rst  0  // you can also connect this to the Arduino reset

High speed test

// For the breakout, you can use any (2 or) 3 pins
//#define sclk 13
//#define mosi 11
#define cs   10
#define dc   9
#define rst  8  // you can also connect this to the Arduino reset

//Use these pins for the shield!
//#define cs   10
//#define dc   8
//#define rst  0  // you can also connect this to the Arduino reset

I also have VCC +5v, GRN and BL +5v.

Any help on this would be just awesome.

Thanks
Rick

nothing...I guess I'll but more displays and see if one of them works...that seems like a viable plan.

I think your LCD module only supports 3.3V and not 5V. That might be the problem.

It's 5v and 3v. There is a jumper that when open the module is 5v and If I close the jumper then it is 3v operation. The jumper is open so it's at 5v.

Which lib do you use? Maybe also send the full .ino file. How did you wire the display?

Oliver

Hi Oliver,

I'm mainly using Adafruit library however I have tried the Arduino library and some programs written by other people.

I've tried connecting it every way possible according the sketch I load.

I have managed to get the screen to coincide brightness with the sketches and this was achieved by removing the VCC line. It will go black when the sketch resets and then the alternating brightness starts again. I just downloaded the UTFT library by Henning Karlsen, I'll try some of these sketches.

I have tried 3.3 volts to the backlight and that did nothing.

I upgraded my Arduino IDE to 1.0.5-r2 and now I'm getting crazy errors when I try and compile the Adafruit sketches...it's looking for files in the Robot directories , I still have my original copy of the IDE so at least I'm safe there.

It's very frustrating that this TFT screen is a key aspect of my little project and it looks like at this point it was just a waste of time. I'm talking 3 days trying to get the screen to work.

I've read every post in the universe about these things I've gone over the data sheet for hours thinking maybe something will ....I don't know. As far as the data sheet even goes....99.99999% is far beyond me.

I did get the SD card reader to work...I think. It sees the card but it's not formatted correctly because it from an old camera but it did see a card so I assume it was working, although I don't really need the SD reader for my soon to be done city, outta here project

EDIT: I just looked at the UTFT examples...I don't even know what those are.

Made a crappy video but you get the idea. SUNP0008 - YouTube

In the video you did not connect VCC, CLK and DIN. All of the pins of the yellow connector MUST be connected to the Arduino.

Again: Maybe you should share the information how all of these pins are connected and how your .ino file has been informed about this wiring.

Oliver

Edit: For my own lib, i have added a tutorial. Maybe this helps also a little bit: Google Code Archive - Long-term storage for Google Code Project Hosting.

Here is the sketch, I didn't post the part that is the drawing test itself . I have tried it with MOSI on pin 11 and SCLK (CLK on the yellow header) and VCC connected to VCC. When VCC is connected there is only a white screen. When VCC is not connected, it will change brightness as the sketch runs.

I have tried each option in this sketch and the results are always the same.

Looking at your link I see that a different library is used.

#include <SPI.h>
#include "Ucglib.h"

Ucglib_ST7735_18x128x160_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);

void setup(void) {
  delay(1000);
  ucg.begin();
  ucg.clearScreen();
}

void loop(void) {
  ucg.setFont(ucg_font_ncenR14r);
  ucg.setPrintPos(0,25);
  ucg.setColor(255, 255, 255);
  ucg.print("Hello World!");

  delay(500);  
}

I cannot find this "library"?

Here is the link the data sheet....I have no idea how to use this. Welcome bestrepairtool.com - BlueHost.com

I have the display hooked up to 3.3v for BL and VCC...no difference.

I mean...wow...this is depressing and I'm wiped out.

/***************************************************
  This is an example sketch for the Adafruit 1.8" SPI display.
  This library works with the Adafruit 1.8" TFT Breakout w/SD card
  ----> http://www.adafruit.com/products/358
  as well as Adafruit raw 1.8" TFT display
  ----> http://www.adafruit.com/products/618
 
  Check out the links above for our tutorials and wiring diagrams
  These displays use SPI to communicate, 4 or 5 pins are required to
  interface (RST is optional)
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/

// For the breakout, you can use any (2 or) 3 pins
//#define sclk 13
//#define mosi 11
#define cs   10
#define dc   9
#define rst  8  // you can also connect this to the Arduino reset

//Use these pins for the shield!
//#define cs   10
//#define dc   8
//#define rst  0  // you can also connect this to the Arduino reset

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>

#if defined(__SAM3X8E__)
    #undef __FlashStringHelper::F(string_literal)
    #define F(string_literal) string_literal
#endif

// Option 1: use any pins but a little slower
//Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, mosi, sclk, rst);

// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, rst);
float p = 3.1415926;

void setup(void) {
  Serial.begin(9600);
  Serial.print("hello!");

  // Our supplier changed the 1.8" display slightly after Jan 10, 2012
  // so that the alignment of the TFT had to be shifted by a few pixels
  // this just means the init code is slightly different. Check the
  // color of the tab to see which init code to try. If the display is
  // cut off or has extra 'random' pixels on the top & left, try the
  // other option!
  // If you are seeing red and green color inversion, use Black Tab

  // If your TFT's plastic wrap has a Black Tab, use the following:
  tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
  // If your TFT's plastic wrap has a Red Tab, use the following:
  //tft.initR(INITR_REDTAB);   // initialize a ST7735R chip, red tab
  // If your TFT's plastic wrap has a Green Tab, use the following:
  //tft.initR(INITR_GREENTAB); // initialize a ST7735R chip, green tab

  Serial.println("init");

  uint16_t time = millis();
  tft.fillScreen(ST7735_BLACK);
  time = millis() - time;

  Serial.println(time, DEC);
  delay(500);

  // large block of text
  tft.fillScreen(ST7735_BLACK);
  testdrawtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ", ST7735_WHITE);
  delay(1000);

Hi

I posted the link the tutorial. The download link for Ucglib (examples are for this lib) is available on the main project page:
Google Code Archive - Long-term storage for Google Code Project Hosting.. Version 0.05... it is underdevelopment, but should work.

As suggested on my tutorial, please create a list of the lables next to the yellow pin header. Then, for each such label let us together define how you should/want do the connection.

Example:
DIN connected to Arduino Uno Pin 11.
...

From this, we will derive the constructor for the library (not sure which lib you want to use, i can talk best about Ucglib).

Oliver

OK, I have the library.

Here are the pin assignments.

TFT- YELLOW HEADER ARDUINO PRO MINI 328P
1-RST---------------------------------->PIN 8
2-CS---------------------------------->PIN 10
3-D/C--------------------------------->PIN 9
4-DIN--------------------------------->PIN 11
5-CLK--------------------------------->PIN 13
6-VCC--------------------------------->PIN VCC
7-BL----------------------------------->PIN 5V
8-GRD--------------------------------->GRD

I took 5v for the back light from the V pin on the pro mini...it's 5v.

ok, so with your setup, the Ucglib constructor should be

Ucglib_ST7735_18x128x160_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);

So, the Ucglib setup should be ok.

Connecting the BL without resistor is a little bit critical. And: What do you mean by PIN 5V? Is your BL connected to some 5V power supply? Unfortunately it is not clear how you power the Arduino Mino from your picture. One picture which covers power supply, Display and Mini together would be more clearly.

The other issue i see is, that the display VCC is connected to Arduino Mini VCC: If you have a 5V variant of the Arduino Mini , the PIN VCC of Display and Mini should be connected to 5V power supply.

Oliver

PIN 5v....There are via holes on the end of the board marked V and G. V = 5v and G = ground. I use these as an additional power and ground.

The back light goes to the one marked V.

I am powering the the Pro mini from my PC USB thru a FT232RL USB to Serial adapter module USB TO 232 : http://www.ebay.com/itm/321327716609?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I do have a variable power supply and I have powered just the back light at 3.3v but this did nothing. I have powered both the pro mini and the back light from at 3.3v, it did not work...same result except the screen was not as bright.

I uncommented that line and loaded the sketch and get the same result....white screen. Again when I remove the vcc the screen flickers but there are no graphics.

//Ucglib8BitPortD ucg(ucg_dev_ili9325_18x240x320_itdb02, ucg_ext_ili9325_18, /* wr= */ 18 , /* cd= */ 19 , /* cs= */ 17, /* reset= */ 16 );
//Ucglib8Bit ucg(ucg_dev_ili9325_18x240x320_itdb02, ucg_ext_ili9325_18, 0, 1, 2, 3, 4, 5, 6, 7, /* wr= */ 18 , /* cd= */ 19 , /* cs= */ 17, /* reset= */ 16 );

Ucglib_ST7735_18x128x160_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);
//Ucglib_ST7735_18x128x160_HWSPI ucg(/*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);

//Ucglib_ILI9341_18x240x320_SWSPI ucg(/*sclk=*/ 7, /*data=*/ 6, /*cd=*/ 5 , /*cs=*/ 3, /*reset=*/ 4);
//Ucglib_ILI9341_18x240x320_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);
//Ucglib_ILI9341_18x240x320_HWSPI ucg(/*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);
//Ucglib_ILI9341_18x240x320_SWSPI ucg(/*sclk=*/ 4, /*data=*/ 3, /*cd=*/ 6 , /*cs=*/ 7, /*reset=*/ 5);	/* Elec Freaks Shield */

//Ucglib_SSD1351_18x128x128_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);
//Ucglib_SSD1351_18x128x128_HWSPI ucg(/*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);
//Ucglib_SSD1351_18x128x128_FT_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);
//Ucglib_SSD1351_18x128x128_FT_HWSPI ucg(/*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8);

//Ucglib_PCF8833_16x132x132_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cs=*/ 9, /*reset=*/ 8);	/* linksprite board */
//Ucglib_PCF8833_16x132x132_HWSPI ucg(/*cs=*/ 9, /*reset=*/ 8);	/* linksprite board */

Hi

Please confirm that you have an Arduino Mini 5V.

Assuming you have a Arduino Mini 5V:

  1. Jumper our USB to 5V
  2. Connect 5V power supply to VCC of the Arduino Mini
  3. Connect 5V power supply to VCC of the Display
  4. Connect 5V power supply (best via 47 Ohm resistor) to your Display (PIN BL)

Background: The display has two different power inputs (BL and VCC). The Arduino Mini also only has a power input, so connecting the display to the Arduino Mini does not make sense.

A picture of all the wiring (display + Arduino Mini + usb power supply) still would be helpfull.

PIN 5v....There are via holes on the end of the board marked V and G. V = 5v and G = ground. I use these as an additional power and ground.

Does not make sense, because you told that the Arduino is powered from the 5V USB power supply, so the Arduino Mino can not provide power.

The back light goes to the one marked V.

Does not make sense to me.

I am powering the the Pro mini from my PC USB thru a FT232RL USB to Serial adapter module USB TO 232

So, where does the power goes to?

I do have a variable power supply and I have powered just the back light at 3.3v but this did nothing.

Even no light? Providing power to the BL pin will turn on back light. Nothing else!

I uncommented that line and loaded the sketch and get the same result....white screen.

I think your power setup is wrong, but you simply do not provide enough information about your actual powersetup.

Oliver

Pro Mini 328 5v: http://www.ebay.com/itm/221402511375?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

OK...right now I have

5v and ground from one power supply (USB) going to the VCC and ground of the pro mini

5v and ground from another power supply going to the back light on the TFT

5V and ground from another power supply going to the VCC of the TFT.

That is 3 different power supplies. 2 of them for the TFT.

I only get white light.

When I hook up 5v to the back light only I do not get a back light.

I set the jumper to 3v and gave it 3v. same result.

I wonder if it's defective. I would hate to buy another one only to have the same results. I tried two different Pro mini boards.

Maybe get a different Arduino board.

reacher10:
5v and ground from one power supply (USB) going to the VCC and ground of the pro mini

5v and ground from another power supply going to the back light on the TFT

5V and ground from another power supply going to the VCC of the TFT.

That is 3 different power supplies. 2 of them for the TFT.

Not sure what you mean by different power supplies: One source for the thee cases will be enough.

Oliver

I just wanted to make sure everything had a good supply.

I'm going to try these and see if I can get something to work.

2.2" inch 240x320 TFT LCD Shield Module SPI serial interface For Arduino: http://www.ebay.com/itm/221293341476

Freaduino UNO MEGA328P-AU: http://www.ebay.com/itm/221207173255

Does anyone see any problems with these choices?

A good shield, but if i remember correctly, only SW SPI is possible.

Oliver

Mmm. I saw in your vídeo that you connected the TFT DIRECTLY to your Arduino. I had several problems like you with the screen flickering and sometimes totally white.
You have an eléctrical problem. Put a resistor of 1kohm in series,not pull up, in each data line and everything will be fine.