TFT SPI 320x240 2.4'' White Display only

I've been trying to make this LCD display to work with all of the solutions i've found, but so far none on them have worked and my display keeps showing a white screen. In some situations it appears to glitch between black and white or flicker between those two.

This is my code

#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <SPI.h>

#define TFT_CS 9    
#define TFT_RST 8   
#define TFT_DC 10    
#define TFT_CLK 13   
#define TFT_MISO 12  
#define TFT_MOSI 11  

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST, TFT_CLK, TFT_MISO, TFT_MOSI);

void setup() {

  tft.begin();
  tft.setRotation(3);  
  tft.fillScreen(ILI9341_BLACK);  

  
  tft.setTextSize(2);
  tft.setTextColor(ILI9341_WHITE);
}

void loop() {
  
  tft.fillRect(10, 10, 220, 40, ILI9341_BLACK);

  
  tft.setCursor(10, 10);
  tft.print("Hello World");

  delay(1000);  
}

Some things worth mentioning are that LED is in series with VCC, the display is connected at 3.3v, I'm using a chinese UNO board (idk if it might be an issue) and i'm not using any resistors (so idk if I might've already damaged it.

Despite what I’ve seen everywhere the display is not 5v tolerant and the inputs CS,MISO, MOSO and so on need to be 3.3v and not 5v , so level shifters are needed .
5v in mine gave the blank display any many hours of frustration !!

Hi Viltroxx,
Does your TFT really have an ILI9341 controller? I have tested 3.5 inch ILI9341-equipped320*240 display with an ESP8266 (see Wiring an ILI9341 SPI TFT display with ESP8266 based microcontroller boards: NodeMCU and Wemos D1 mini – thesolaruniverse). There is a downloadable sketch
ciao, Photoncatcher
I don't seee #includes in your code. Intentionally?

I would suppose so, since I've seen guides on my specific display that say it's an ILI9341.

I can't quite really see any signs of a specific controller.

There are includes at the very top of the code, but if you can't see them, they're the SPI, Adafruit GFX and ILI9341 libraries.

I think this is a very good article --
Interfacing Arduino with ILI9341 color TFT display - Simple Circuit (simple-circuit.com)

I've been using this example but it's still white.

The possibility of it already being poor quality has been through my mind since i've done nothing to damage it. Just to do all I can, i've been running diags on my TFT using MCUfriend

LCD_ID_readreg


reg(0x00B7) B4 B4	Entry Mode Set
reg(0x00BF) BC BC BC BC BC B8	ILI9481, HX8357-B
reg(0x00C0) C0 C0 C0 C0 C0 C0 C0 C0 C0	Panel Control
reg(0x00C8) C8 C8 C8 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0	GAMMA
reg(0x00CC) CC CC	Panel Control
reg(0x00D0) D0 D0 C0	Power Control
reg(0x00D2) D0 D0 C0 C0 C0	NVM Read
reg(0x00D3) D0 D0 D0 D0	ILI9341, ILI9488
reg(0x00D4) D4 D4 C4 C4	Novatek ID
reg(0x00DA) D8 D8	RDID1
reg(0x00DB) D8 D8	RDID2
reg(0x00DC) DC DC	RDID3
reg(0x00E0) E0 E0 E0 E0 E0 E0 E0 C0 C0 C0 C0 C0 C0 C0 C0 C0	GAMMA-P
reg(0x00E1) E0 E0 E0 E0 E0 E0 E0 C0 C0 C0 C0 C0 C0 C0 C0 C0	GAMMA-N
reg(0x00EF) EC EC EC E4 E4 E0	ILI9327
reg(0x00F2) F0 F0 E0 E0 E0 E0 E0 C0 C0 C0 C0 C0	Adjust Control 2
reg(0x00F6) F4 F4 E4 E4	Interface Control

diagnose_TFT_support

tft.readID() finds: ID = 0x0

MCUFRIEND_kbv version: 3.0.0


This ID is not supported

Erm … did you read my post ? The display is NOT rated for 5v . This will cause a blank white display .
See the data sheet for the chip , which gives a maximum voltage of 4.6volts on the connections .
Fix that and run a library example

Page 233/234

Here

I have the same display, same backside, but with touch (U1 present). Mine is ST7789, V1.3.

It doesn't have level converters, data lines are 3.3V.

I successfully used it with Arduino_GFX, known by Library Manager.

I also recommend TFT_eSPI.

Hi Viltroxx,

This worked with my 2.8 inch diagonal ILi9341 SPI display:"
#include <Adafruit_GFX.h> // library
#include <MCUFRIEND_kbv.h> // library

MCUFRIEND_kbv tft;

#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4

-- but you seem to have been tinkering with MCUFRIEND_kbv
Some of these displays use an ILI 9482, ILI9486 or ST7789
success, Photoncatcher

Does MCUFriend_kbv work with SPI now? I need to update my knowledge about this library.

Seems so: https://github.com/prenticedavid/MCUFRIEND_kbv/blob/master/utility/mcufriend_serial.h

In https://github.com/prenticedavid/MCUFRIEND_kbv/blob/master/MCUFRIEND_kbv.h
uncomment line 10:

//#define USE_SERIAL

Must have been in my very early Arduino days that David told me it doesn't support SPI.

Could you post what code did you use? I'd like to see if it could run on mine

See R4 + TFT LCD - running examples ? - UNO R4 / UNO R4 WiFi - Arduino Forum.

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