I'm getting white screen on my TFT display with ILI9341 chip

I am able to program my display but i'm getting white screen on the display. If I tilt the screen and see from the sideways, screen seems to display images but if I see front its just white. Interestingly, when I press reset button, it shows test display (Image attached)

I also tried with USB asp program with MightyCore board, the display was working however too slow to show up contents. But with arduino, programs(ada fruit graphicstest) takes just 5 second to upload but nothing shows up. Attaching images for reference.



What library are you using? What code are you using?

I'm using adafruit GFX library and Adafruit ILI9341 libraries.

Here is the test code:

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"

// For the Adafruit shield, these are the default.
#define TFT_DC    9
#define TFT_CS    10
#define TFT_RST   8


// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC,TFT_RST);
// If using the breakout, change pins as desired
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);

void setup() {
  Serial.begin(9600);
  Serial.println("ILI9341 Test!"); 
 
 
 pinMode(TFT_CS, OUTPUT);
 pinMode(7, OUTPUT);
 pinMode(TFT_CS, HIGH);
 pinMode(7, HIGH);
 

  tft.begin();
  delay(100);
  // read diagnostics (optional but can help debug problems)
  uint8_t x = tft.readcommand8(ILI9341_RDMODE);
  Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDMADCTL);
  Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDPIXFMT);
  Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDIMGFMT);
  Serial.print("Image Format: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDSELFDIAG);
  Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX); 
  
  Serial.println(F("Benchmark                Time (microseconds)"));
  delay(10);
  Serial.print(F("Screen fill              "));
  delay(500);

  Serial.print(F("Text                     "));
  Serial.println(testText());
  delay(3000);

  Serial.println(F("Done!"));

}


void loop(void) {
  
    tft.fillScreen(ILI9341_BLACK);
  
    delay(100);  // Give some time after reset
    tft.setRotation(1);
    testText();
    delay(1000);
  
}

unsigned long testText() {
  tft.fillScreen(ILI9341_BLACK);
  unsigned long start = micros();
  tft.setCursor(0, 0);
  tft.setTextColor(ILI9341_WHITE);  tft.setTextSize(1);
  tft.println("Hello World!");
  tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2);
  tft.println(1234.56);
  tft.setTextColor(ILI9341_RED);    tft.setTextSize(3);
  tft.println(0xDEADBEEF, HEX);
  tft.println();
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(5);
  tft.println("Groop");
  tft.setTextSize(2);
  tft.println("I implore thee,");
  tft.setTextSize(1);
  tft.println("my foonting turlingdromes.");
  tft.println("And hooptiously drangle me");
  tft.println("with crinkly bindlewurdles,");
  tft.println("Or I will rend thee");
  tft.println("in the gobberwarts");
  tft.println("with my blurglecruncheon,");
  tft.println("see if I don't!");
  return micros() - start;
}

I don't see any level converters on the display. It should not be "tortured" with 5V (Arduino UNO IO) signal levels. This may distort SPI signals.

its working with MiniCore board but wasa too slow when I was using USBasp programmer. Then I ordered UNO board to program it. So i guess voltage is not an issue. Also you see J1 jumper, if I connect then it will work on 3.3 but I'm ok with 5V.

@silentobserver I didn't get you maybe. Can you elaborate?

Display controllers are specified for nominal 3.3V control and data levels. Maximum may be ~4.5V, with reduced life expectancy. Your UNO will power the controller through the protection diodes on input signals, which will distort SPI signals.
Any display made for use with Arduino UNO has (or should have) level converters or resistive voltage dividers (or diodes and pull-up resistors on some exotic one).

You and your partner are doing the same thing with the same devices. Your code works. Your wiring or devices are not working.

On my display that looks the same I have put a sticker ST7789. I tested it with ESP32.

I appear to have the same display - the Adafruit_ILI9341 library and the Bodmer/TFT_eSPI graphics library worked OK with an ESP32
I would not attempt to connect such a display to a UNO

@horace so you are saying that its better to drive ILI9341 LCD using esp32 instead of UNO?

@silentobserver somehow the LCD works when I program it with USBASP using MightyCore board with ATMEGA16. But the problem was, display was too slow to show up the contents (atleast 10x slower than expected). This might be due to internal frequency. I'm not sure about. Then I moved to arduino board and got this white screen issue.

I tend to avoid microcontrollers which use 5V logic
although possible interfacing to 3.3V logic devices is a pain

EDIT: have a look at thread 2-4-tft-lcd-with-sc-card-barometer-on-a-uno on similar topic

I think something is going wrong with digital pin 7, in your picture there is nothing connected to pin 7, butt you declare pin 7 for CS for the display.
First it will be using

#define TFT_CS 10

and later it will be

pinMode(TFT_CS, OUTPUT);
pinMode(7, OUTPUT);
pinMode(TFT_CS, HIGH);
pinMode(7, HIGH);

// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
#define TFT_RST 8

// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC,TFT_RST);
// If using the breakout, change pins as desired
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);

void setup() {
Serial.begin(9600);
Serial.println("ILI9341 Test!");

pinMode(TFT_CS, OUTPUT);
pinMode(7, OUTPUT);
pinMode(TFT_CS, HIGH);
pinMode(7, HIGH);`

I think I have to R&D with atmega16 using mighty core, seems working but was too slow. I will try to correct the clock rate and see if that's helpful but question still remains, it should have work with arduino uno.

I was able to manage to run the display using esp32 board(bought new for this). However while testing 240x320 test example. My screen is not fully filled and shows content upto 80% screen only. Can anyone help me out on this? if something in the code I need to change?

Also, i'm connecting esp32 board directly with my laptop USB port to provide power. It is throwing 4V as checked in multimeter. How can I limit that? My esp32 board hasn't fried up yet.

check the video here: Watch VID20241113130149 | Streamable
expire in 2 days.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.