Interfacing Arduino with ILI9341 color TFT display

This Arduino tutorial shows how to interface the Uno board with ILI9341 TFT display.
The ILI9341 TFT module contains a display controller with the same name: ILI9341. It’s a color display that uses SPI interface protocol and requires 4 or 5 control pins, it’s low cost and easy to use. The resolution of this TFT display is 240 x 320 which means it has 76800 pixels. This module works with 3.3V only and it doesn’t support 5V (not 5V tolerant).
TFT: Thin-Film Transistor.
SPI: Serial Peripheral Interface.

Hardware Required:

  • Arduino UNO board
  • ILI9341 TFT display module
  • 5 x 3.3k ohm resistor
  • 5 x 2.2k ohm resistor
  • Breadboard
  • Jumper wires

Arduino uno with ILI9341 TFT display

Interfacing Arduino with ILI9341 TFT display circuit:
Hardware circuit diagram of the example is shown below.

Arduino ILI9341 color TFT display interfacing circuit

The ILI9341 TFT display board which is shown in the circuit diagram above has 14 pins, the first 9 pins are for the display and the other 5 pins are for the touch module.
So, the display side pins which numbered from 1 to 9 are (from left to right): VCC (5V), GND (ground), CS (chip select), RST (reset), DC (or D/C: data/command), MOSI (or SDI), SCK (clock), BL (back light LED) and MISO (or SDO).
MOSI: master-out slave-in.
SDI: serial data in.
MISO: master-in slave-out.
SDO: serial data out.

As mentioned above, the ILI9341 TFT display controller works with 3.3V only (power supply and control lines). The display module is supplied with 5V that comes from the Arduino board. This module has a built-in 3.3V regulator which supplies the display controller with 3.3V from the 5V source.

All Arduino UNO board output pins are 5V, connecting a 5V pin to the ILI9341 TFT display may damage its controller.
To connect the Arduino to the display module, I used voltage divider for each line which means there are 5 voltage dividers. Each voltage divider consists of 2.2k and 3.3k resistors, this drops the 5V into 3V which is sufficient.

So, the ILI9341 TFT display is connected to the Arduino board as follows (each one through voltage divider):
CS pin is connected to Arduino digital pin 8,
RST pin is connected to Arduino digital pin 9,
D/C pin is connected to Arduino digital pin 10,
MOSI pin is connected to Arduino digital pin 11,
SCK pin is connected to Arduino digital pin 13.

Other pins are connected as follows:
VCC pin is connected to Arduino 5V pin,
GND pin is connected to Arduino GND pin,
BL (LED) pin is connected to Arduino 5V pin,
MISO pin is not connected.

Interfacing Arduino with ILI9341 TFT display code:
The following Arduino code requires two libraries from Adafruit Industries:
The first library is a driver for the ILI9341 TFT display which can be installed from Arduino IDE library manager (Sketch —> Include Library —> Manage Libraries …, in the search box write “ili9341” and choose the one from Adafruit).

The second library is Adafruit graphics library which can be installed also from Arduino IDE library manager.

The previous two libraries can also be installed manually:
Download both libraries from the following two links:
Adafruit ILI9341 TFT library   —->  direct link
Adafruit graphics library        —->  direct link

Go to Arduino IDE —> Sketch —> Include Library —> Add .ZIP Library … and browse for the .zip file (previously downloaded).
The same thing for the second file.

The previous 2 libraries are included in the main code as shown below:

The ILI9341 TFT display is connected to Arduino hardware SPI module pins (clock and data), the other pins which are: CS (chip select), RST (reset) and DC (data/command) are defined as shown below:

Full Arduino code:
The following Arduino code is from Adafruit ILI9341 library (graphicstest.ino) with some modifications in order to work with the above circuit diagram.

The following video shows my simple hardware circuit test:

And this one shows Proteus simulation (not perfect result!):
Note that Proteus simulation circuit is not the same as real hardware circuit, project hardware circuit diagram is shown above.

Proteus simulation file download link is below, use version 8.6 or higher to open it:
Arduino and ILI9341 TFT Proteus simulation

11 thoughts on “Interfacing Arduino with ILI9341 color TFT display”

  1. You’re really confusing when you make this statement:
    This module works with 3.3V only and it doesn’t support 5V (not 5V tolerant).

    Then the wiring diagram shows 5 volts from the Uno being used.

    1. As mentioned above, for the +5V power supply:
      This module has a built-in 3.3V regulator which supplies the display controller with 3.3V from the 5V source.
      and for control/data pins:
      To connect the Arduino to the display module, I used voltage divider for each line which means there are 5 voltage dividers. Each voltage divider consists of 2.2k and 3.3k resistors, this drops the 5V into 3V which is sufficient.

  2. Peter Armstrong

    The initialising line doesn’t seem right. Are you sure of the order of paramaters.
    This worked for me: I defined all the pins
    Adafruit_ILI9341 tft = Adafruit_ILI9341(T_CS, T_DC, T_MOSI, T_CLK, T_RST, T_MISO);
    Do you have RST in the wrong place?

  3. Hello folks! Well, I suppose, using D3 as PWM-Output to have a dimmable LED-Backlight would be a really good idea: pinMode(3,OUTPUT); analogWrite(3,200);

  4. Hi, I got UNO R3 and this type of display fitting directly in the UNO r3. But my screen stays white. Is this because I need more power or? Feeding from the USB from a MacBookPro. The power supply is coming, but like to going on.

    Any suggestions/Ideas?

  5. I think the J1 solderable link allows the ILI9341 display to be powered from a 3.3v source. The ILI9341 specs say max. of 3.3v operation hence the 3.3v LDO regulator on board. How long the display lasts when fed with 5v with J1 bridged may not matter of course.

  6. On the displays that i bought (ILI9431s) there is a jumper on the back of the unit marked JI. I have seen some documentation that claims this sets the display to work with 5 volt logic from a UNO/NANO, etc. I am trying to confirm that but wonder is you know the answer to this. The shield version works fine and must have logic level converters built in.
    Thanks, Jack

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top