QVGA 2.2 inch TFT SPI 240x320 (ILI9341) is not working! [SOLVED]

Hello People!

I'm interfacing with QVGA 2.2 inch TFT SPI 240x320

My problem is that I was so excited to start interfacing with the TFT that I started to wiring the TFT and test it with the Adafruit_ILI9341 library and the LCD display with ILI9341 driver on Arduino Thread, but it doesn't work, I forgot to check the datasheet of the controller (ILI9341).

Then I looked in the datasheet of the controller and I saw that it needs to be sourced with 3.3V and I was sourcing the TFT Screen with 5V :o :confused: :frowning:

After that I tested the TFT with the 3.3v with no updates, nothing happens. I checked if I have short circuits on the TFT boards but it doesn't have, at least.

So now I don't know if I had damaged the TFT Screen or is just that I'm missing something on the library, wiring connection or code

If somebody could provide me a wire connection to test it with the Arduino Uno
and a Library to make work the TFT, it would be great!

I will leave you here the ILI9341's datasheet

Here's attached hardware's pictures:

I hope to receive some help from you guys

Sorry for my english and best regards!

See 2.2" display notes here.

If you are using the Adafruit library do not forget to include the reset pin in the constructor.

So according to that, I have to wire the QVGA 2.2 Inch TFT Spi board like this picture? I draw it with Eagle to make easier to understand.

I had noticed about the wiring connections in the instructables:

UNO +5V to display pin 1 (VCC) and pin 8 (LED)
UNO 0V (GND) to display pin 2 (GND)
UNO digital pin 7 through a 1K2 resistor to display pin 4 (RESET), add a 1K8 resistor from display pin 4 to GND
UNO digital pin 9 through a 1K2 resistor to display pin 5 (DC/RS), add a 1K8 resistor from display pin 5 to GND
UNO digital pin 10 through a 1K2 resistor to display pin 3 (CS), add a 1K8 resistor from display pin 3 to GND
UNO digital pin 11 through a 1K2 resistor to display pin 6 (SDI/MOSI), add a 1K8 resistor from display pin 6 to GND
UNO digital pin 13 through a 1K2 resistor to display pin 7 (SCK), add a 1K8 resistor from display pin 7 to GND

I made a test and I got a White Screen as an ouput on the TFT Display, I think this is a good sign, maybe it's going to need some code to get it work

I will test now with the Adafruit library

I still have not get to work the TFT, I have always a white Screen...

My connections are:

All connections are wiring with a voltage divider (less VCC & LED):
arduino pin (5V signals) ----1k----display pin (Approx. 3.3V) ----1k8----GND

TFT----------Arduino UNO:
VCC---------3.3V
GND--------GND
CS----------PIN10
RESET -----PIN8
D/C---------PIN9
SDI(MOSI)-PIN11
SCK---------PIN13
LED---------47ohms----3.3V
SDO(MISO)-PIN12

I also receive a response from serial monitor!

I'm starting to think is a current issue... Any Suggestions? Or maybe another library?

Connect the LED+47R to 5V.

You can connect VCC to 5V (if J1 is open). The onboard LDO will provide 3.3V for the ILI9341.
Your voltage-dividers ensure that the ILI9341 sees 3.3V logic.

The Adafruit example should read registers and display on Serial Terminal.
What do you get?

Have you used the full-fat constructor() ? i.e. with PIN8
Adafruit examples use a short form without the LCD_RESET argument.

David.

Thanks for your answer!

Connect the LED+47R to 5V.

You can connect VCC to 5V (if J1 is open). The onboard LDO will provide 3.3V for the ILI9341.
Your voltage-dividers ensure that the ILI9341 sees 3.3V logic

I will try in that way, currently from my voltage-dividers I get 3.2V and I think that's not going to be a problem to see 3.3v logic

The Adafruit example should read registers and display on Serial Terminal.
What do you get?

From Serial Terminal I receive a response, I will attach here

Have you used the full-fat constructor() ? i.e. with PIN8
Adafruit examples use a short form without the LCD_RESET argument.

Certainly not, first I was testing with only running the graphictest from adafruit, then I include the reset:

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

with no results, is that what are you talking about?
Sorry to not understand

I would expect to see:

ILI9341 Test!
Display Power Mode: 0x9C
MADCTL Mode: 0x48
Pixel Format: 0x5
Image Format: 0x9C
Self Diagnostic: 0xC0

If you don't get a proper diagnostic result, there is little point in continuing.

This is the full-fat constructor:

// 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);

Adafruit like to omit the TFT_RST argument e.g.

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

I presume they do this on purpose. So that they can crash every Red Display and possibly sell more of their own Displays. (which have an external pullup on TFT_RST)

Incidentally, I tried the Adafruit example with "their" constructor. I get a White Screen.

ILI9341 Test!
Display Power Mode: 0x0
MADCTL Mode: 0x0
Pixel Format: 0x0
Image Format: 0x0
Self Diagnostic: 0x0

David.

I have good news!

I made it!

I was missing one thing in the code:

I will suggest to follow this steps ILI9341 TFT
This comes from the graphictest from adafruit ILI9341:

// For the Adafruit shield, these are the default.
#define TFT_RST 8   // You have to add this
#define TFT_DC 9
#define TFT_CS 10
 
// 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); // also TFT_RST has to be included to make it work

One thing that I notice is that I maybe have to change the voltage-divider resistors:

5V_Signal-----1k----(Approx 3.2V)----1.8k----GND

Because sometimes the Screen get freeze and I have to reboot the system, also sometimes is showing whitescreen again, is like noise issue. But at the moment is working great! :slight_smile: