Introduction: Cheap TFT 2.2 Inch Display on Arduino (ILI9340C or ILI9341)

Picture of Cheap TFT 2.2 Inch Display on Arduino (ILI9340C or ILI9341)

I ordered a 240 x 320 pixel 2.2 inch TFT LCD display off of ebay for £3.86 which is dirt cheap compared to similar displays from some of the western companies. The only problem was that there wasn't a guide to how to get it working! When I figured it out I thought I'd make an Instructable for anyone with the same issues. It actually turned out to be quite simple. This tutorial doesn't show you how to use the SD card functionality.

The Ethics:
A couple of users have complained that I am using adafruit libraries and I am not supporting adafruit. I'd like to point out that adafruit provide their libraries under The MIT License, which amoungst other things says:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...

You can look up the entire license if you are interested.

I understand this to mean that adafruit are perfectly happy for their code to be edited to drive cheap chinese displays, and there is no point going to the effort of writing my own code to drive it. If you have an issue with the ethics, I'd like to point out that my behavior is perfectly legal so please keep your rant elsewhere. Thankyou.

Step 1: Parts List

Picture of Parts List

2.2" Serial 240x320 SPI TFT LCD Module Display ILI9340C

An Arduino compatible microcontroler - I use a Breadboard Arduino

Something to convert to 3.3V logic - I power my breadboard Arduino with 3.3V

My setup is a little like this although I ordered my components separately.

Step 2: Install the Correct Libraries

Luckily for us, Adafruit have a very similar display that they have written libraries for. I have the display which is powered by the ILI9340 driver so I installed that library so I assume if you have a display with the ILI9341 driver it works exactly the same with the other library that I linked. I haven't seen any other drivers used but if you do, I recommend searching the Adafruit libraries on github.

You also need to install the Adafruit GFX library regardless of what driver the display uses.

Instructions on how you do this are on the github pages linked.


My arduino IDE updated and it didn't like having hyphens/underscores in folder names of libraries. If you are getting an error message complaining about these characters try removing them from the folder names (but not the names of the .h and .cpp files).

Step 3: Wire It Up and Upload the Example Sketch

Picture of Wire It Up and Upload the Example Sketch

There is an example sketch included with the ILI9340/1 library called graphics test. You have to wire the display up in accordance to the pin definitions there.

Originally When I wrote this Instructable I wrote:

I'd like to emphasize that this display uses 3.3V logic, and will not work if you use 5V. This is information that I found on some forum somewhere and using it I got my display to work

I now have multiple of these displays from different sellers (and perhaps different factories). I have noticed that some of them also behave using 5V logic.

As labeled on my display module, the connections are

SCK - Arduino Pin 13
SDO(MISO) - Arduino Pin 12
SDI(MOSI) - Arduino Pin 11
CS - Arduino Pin 10
D/C - Arduino Pin 9
RESET - Arduino Pin 8
LED - 3.3V / 5V
VCC - 3.3V / 5V

Upload the example sketch and give it a go, the sketch shows you well how to control the display.

You may have to fiddle with the voltages for your particular model. There are various options you have here -potential dividers on each pin, level shifters, or simply powering your arduino with a 3.3v supply (this is perhaps the hackiest and can be slightly temperamental). See the comments for details.

Also, there is information about how to use the library on adafruits website.

A datasheet can be found here

You may do what you like with this Instructable, without having to contact me first.


torykay85 (author)2014-09-25

Hello, I worked with the 2.2 inch SPI LCD again.

I connected the 3,3V LCD with an Arduino Uno R3 5V. I used a resistor divider as a levelshifter.

LCD 3.3V #


Arduino Pins 5V #-----|4k7|----#----|10k|-----# GND

charudatt (author)torykay852016-10-21

I am also planning to try it, not yet tried it, Actually my CC2500 projects use the scheme. I was just wondering why are people not using the same. Thank you for the confidence

tomk11 (author)torykay852014-10-28

Thank you for this! I remember trying this origionally and ended up using a 3.3v source instead because for some reason it didn't work. Clearly I made some kind of mistake.

Idrispo made it! (author)2017-11-30

for the graphic test, please redeclare and activate the lower part. Make sure uncomment pin rewiring and make sure put voltage divider for DC, CS, MOSI,CLK and MISO

/// kenedeclare dulu

#define TFT_DC 9

#define TFT_CS 10

#define TFT_MOSI 11

#define TFT_CLK 13

#define TFT_RST 8

#define TFT_MISO 12

// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC

//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

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

Hardkrome (author)2017-11-26


Put a 100ohm resistor in series on the
power supply to the display. You need to limit the current. Make sure
you use the voltage dividers to the data pins.


The include file calls for

// Use hardware SPI (you have to add the TFT_RST here.)

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);

SDI - 11

SDO -12

SCK -13

You can move the others around

greatmallard (author)2017-11-25

My screen shows blank white, but if you look hard enough, you can see lines of color where the graphics test is supposed to be happening. Do you have a fix for this?

Hardkrome (author)greatmallard2017-11-26

Put a 100ohm resistor in series on the power supply to the display. You need to limit the current. Make sure you use the voltage dividers to the data pins.

I also could not get the SPI mode to work until I defined the damn reset. I had to dig thru the library to figure that out.

// Use hardware SPI
TFT_ILI93XX tft = TFT_ILI93XX(TFT_CS, TFT_DC, TFT_RST); //reset has to be defined with library.

FlyboyB1 (author)2017-08-13

It should work with this plug and play shield don't you think?

FlyboyB1 (author)2017-08-13

It should work with this plug and play shield don't you think?

stanleyella (author)2017-07-23

The ILI9341 is supported in Great Cow Basic which compiles for uno

oululife (author)2014-09-20


I've found a cct. diagram of this unit. Seems the little jumper on the back of the board should be shorted with a blob of solder for 3v3 operation. As it's an LDO regulator, you might just get away with it...
( One of the sellers has a file The schematic is in that.)


sector7gp (author)oululife2017-05-29

Great man!! you got the answer! Im powering with 3v3 from arduino and jumpered the J1 ! works excelent!!

saabman (author)oululife2015-03-28

Thanks for that one, your post got my attention. Then i did hook up vcc to 5 volt. Voila its working.

HengD1 made it! (author)2016-07-29


I have been working on a tft 2.8 spi display for a while and cant make it working. the display is shown below, just mine is 2.8. I tried to use adafruit ili9341 library but it wont work. the serial monitor seems to be right though. Do you know what could possiblly be wrong. Thank you very much

tomk11 (author)HengD12016-07-29

It has been some time since i've used this display first but here are my thoughts.

Serial monitor working -> those pins which deal with communication are correct - sck and sdi I think (maybe cs too cant remember what that does?)

These are the correct symptoms for a a voltage problem. If i remember correctly some displays need 3.3v and some need 5v. incorrect voltage doesn't necissarily mean nothing works - from my experiance sometimes the backlight lit up but nothing happened sometimes. This is just a guess for where to start digging so I may be wrong. There are plenty of fantastic comments addressing these voltage issues.

legokid12 (author)tomk112017-05-09

CS is chip select, or the load pin.

MichaelM897 (author)tomk112016-08-10

I've been having this exact same problem (the output is exactly identical as well). I've used both 3.3v power (from an Arduino Mini) and 5v power (from an Arduino Uno), but neither have worked. Any advice on where to go from here?

tomk11 (author)MichaelM8972016-08-11

What do you see on the display? A blank white screen? a blank black screen? something else?

MichaelM897 (author)tomk112016-08-11

It's a blank white screen (although with a blue tint, certainly from the backlight). I've kept the screen on for long periods of time with both 5v and 3.3v voltages, and have found that it generates a lot of heat when give 5v, therefore it must be meant for 3.3v, as it resists the excess power. The document on it that the seller sent confirms this, and also says that the driver is an ILI9341, so I've had little reason to doubt that. I think that I'll try seeing the output when using an ILI9340 driver next. Besides that, are there any other things I might be doing wrong?

tomk11 (author)MichaelM8972016-08-11

Nothing springs to mind, double check that your voltage is okay, and also check that you have enough current to drive the display. I remember getting this blank white screen before I got my power right. It could be something else but other than that I don't know what to suggest. When I have some free time maybe I'll dig mine out and try to set it up again.

curtis.newton.104203 (author)2016-12-26

that gfx library is miserable and wont build on windows

The Adafruit GFX library has been tested to work on current versions of Windows. You are setting it up incorrectly.

curtis.newton.104203 (author)2016-12-26

white screen and there is no reset line so update your tutorial

You wired it up incorrectly and there is a reset pin on the model he is referring to.

fabianbambam (author)2017-04-28

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:










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

AndrewM512 (author)2017-04-01

my pinout is starting at pin1 vcc,gnd,gnd,nc,nc,led,clk,sdi,rs,rst.cs, i have no clue as to what clk rs would get connected to ?here are the specks on the ldc :

Size: 2.2 inch
Module Size: 67x40x4 mm
Active Area: 47.5x36.5 mm
Resolution: 240 x 320 (RGB)
Interface: 4-Wire SPI
Color Depth: 262K/65K
LED Numbers: 4 LEDs
Driver IC: ILI9340C

Just need 5 IO port (analog SPI), or direct hardware SPI (fast), you can drive the input voltage support 5V/3.3V, ILI9341 drive
Suitable for beginners who are new to touch the color screen, LCD lovers who pursuit display effect and the microcontroller enthusiasts learners
Support serial SPI mode
It has PCB backplane with power IC, SD card socket
Need 4 IOs from your MCU only
Dot Matrix: QVGA 240*320 Dots
Interface 4-Wire SPI

delreer (author)2017-01-19

I am using the 2.2 TFT w/ILI 9340C. I got it to work just fine but I can only do text character. How can I display a variable, like a sensor value?

#include "SPI.h"

#include "Adafruit_GFX.h"

#include "Adafruit_ILI9340.h"

#if defined(__SAM3X8E__)

#undef __FlashStringHelper::F(string_literal)

#define F(string_literal) string_literal


// These are the pins used for the UNO

// for Due/Mega/Leonardo use the hardware SPI pins (which are different)

#define _sclk 13

#define _miso 12

#define _mosi 11

#define _cs 10

#define _dc 9

#define _rst 8

// Using software SPI is really not suggested, its incredibly slow

//Adafruit_ILI9340 tft = Adafruit_ILI9340(_cs, _dc, _mosi, _sclk, _rst, _miso);

// Use hardware SPI

Adafruit_ILI9340 tft = Adafruit_ILI9340(_cs, _dc, _rst);

int sensorPin = A0;

int sensorValue ;

char sensorPrintout[4];

void setup() {

// put your setup code here, to run once:


while (!Serial);

Serial.println("Adafruit 2.2\" SPI TFT Test!");


Serial.print(F("Text "));




void loop() {

// put your main code here, to run repeatedly:

String sensorValue = String(analogRead(sensorPin));

sensorValue.toCharArray(sensorPrintout, 4);


unsigned long testText() {


unsigned long start = micros();

tft.setCursor(1, 2);

tft.setTextColor(ILI9340_BLACK); tft.setTextSize(3);

tft.println("LOVE YOU LANA");

tft.setCursor(120, 2);

tft.setTextColor(ILI9340_RED); tft.setTextSize(2);


return micros() - start;


NeilM82 (author)2016-10-20

Anyone know how to use the SD card on this display? Any help would be appreciated.

DeepenS (author)2016-10-01

I was thinking of purchasing this display. Is it sunlight readable ? Suitable for outdoor use ? I intend to use it for motorsport applications.

arjan1974 (author)2016-09-29

Hi my name Arjan from the Netherlands,

I have to thank so far functioning working demo.

I have another question.

Where can I find the right Arduino instructions for creating a circle, square, pixel, etc. ??

has anyone examples or a web address

LotharK1 (author)2016-05-04

Ok, it works!!!!!

Many tanks to the author tomk11 and to torykay85 for a Fix in his comment.

Good Job Guys!!!!

cyzen made it! (author)2016-04-14

Got it easy to run with you receipt - thank's a lot!

JayEffW (author)2015-08-06

Hi! Thanks to this post and the comments, I got my display to work. I initially had some issues and was going to ask for help, but I figured it out myself now and will instead post my solution here. If you're experiencing the symptoms shown below in the pictures, this post might just help you.

TL;DR: The ebay listing listed the wrong display driver chip. It listed the ILI9341 and I used the corresponding library, producing the symptoms below. I then, on a hunch, tried the ILI9340 library, which fixed the issues. This makes me believe that it was merely the listing that was wrong.

Longer description of my setup:

The pictures displayed did not match what I see everywhere else, resetting the image was clearly not working correctly.

I used a board with a couple of voltage dividers to shift my 5v logic down to 3.3v. It's more like 3.0v but from what I gathered, that shouldn't be a big deal. I'm using 2.7k and 5.6k resistors as such:

gnd -- 5.5k -- <display pin> -- 2.7k -- <arduino pin>

with all gnd being connected to the one arduino gnd pin. VCC and LED I connected directly to the arduino's 3.3v output as the LED wouldn't work on the 3.0v provided by my divider.

This setup now works for me, so I hope this helps!

GavinH24 (author)JayEffW2016-04-08

Yep +1 on this - I bought these displays from two separate aliexpress sellers, both of which were clearly described as

1PCS NEW ILI9341 2.2 inch 2.2" SPI Serial Port TFT LCD Display Screen 240*320 Dots 5V/3.3V

Both panels used ILI9340, and neither supported 5V GPIO logic - I had to make a bank of resistors to divide the +5V voltage down to approx 3.3V

(I used 390 and 200 ohm, since that's what I had in the box :)

esterlynquesada (author)2016-02-03

After much trying and trying different configurations, I finally made it work and to read files on the SD card. I share my solution:


5 +







220k resistor ==> 5


I used the library to recommend the following link:

I hope they help you

mvcorrea (author)2016-01-12

hi there,

Does anyone figure out the power consuption of this device(sleep/active)? I am unable to find the values on the datasheet. regards,

Fezder made it! (author)2016-01-11

Thanks, it worked finally! screen is quite screwed as it got damaged....but it worked enough for test.

AlyssonR2 (author)2016-01-02

I use a simple, transistor-based level shifter that takes its supplies from both the host (system) and slave (remote) devices - allowing it to automatically compensate for supplied voltage. It also handles a few extra load units!

Jatin Gandhi made it! (author)2015-12-24

thanks a lot. I have used arduino pro mini 3.3 V.

soundmanu (author)2015-11-26


with the help of that blog and the post of torykay85 the TFT works! Thanks for that!!
But my TFT on UNO is very, very slow .... When I want to set the TFT on Hardware ID it won't work, but when I define all Pin's (13,12,11,etc...) then it work but very slow!! Anybody would help me ..?

dj4you (author)2015-11-10

Is it mandatorily i should use 3.3V or 3V also enough for proper operation of the module?..... please someone give me the answer

RuneP3 (author)dj4you2015-11-19

It depends on the specific components used on your display. Quite often 3v is sufficient for 3.3v modules.

CelticHarp (author)2015-11-11


My TFT works, but now I want to load a bmp from the SD. How can I do this? What is the wiring?

CelticHarp (author)CelticHarp2015-11-12

I am using Adafruit ILI9340 library.

gbushta made it! (author)2015-11-08

I just wanted to say thank you. I played with this cheap TFT for a little while, actually quite a while. I was just about to give up when all of a sudden it started working. The ones I bought work on 5v. I fought with my bareduino (on a breadboard) and with an Uno. BTW, I saw your reset button on your breadboard and just had to add one to mine. It sure works nicely. Thanks for that, too.

encodersofia (author)2015-05-06

Didn't work first time. Reset pin on the LCD must be high and it will work. Just add

pinMode(8, OUTPUT);

digitalWrite(8, LOW);

digitalWrite(8, HIGH);

to your Arduino sketch or connect reset pin to 3.3V by wire

bratan (author)encodersofia2015-06-13

Thank you for the Reset tip! I couldn't get mine to work until I connected it to 3.3V! Author should definately include this in the instructable.

NeilK3 (author)2015-05-12

On step 3, you write "LCD - 3.3V". I think this should be "LED - 3.3V".

messina.david.7 (author)2015-04-28

j'ai réalisé le montage avec une carte compatible Arduino
nano. J’ai utiliser le pont de résistance pour adapter la tension .

l'écran TFT utilisé est exactement le même qu'ici.

résultat :

- il as fallut que je trouve les drivers de la carte
compatible arduino nano

- le programme
graphicstest ne démarre pas toujours au moment ou je branche
l'alimentation de la carte

actuellement j’essais de comprendre pourquoi le démarrage n’es
pas systématique

Surferdude (author)2015-03-26

I tried installing this for an Arduino, but it doesn't even compile. The first problem is that the include statement:

#include <Adafruit_GFX.h>

in the file Adafruit_ILI9340.h is incorrect. I think it should be

#include "Adafruit_GFX.h"

The next problem, that I have not solved yet, is the error

'initG' was not declared in this scope

The ILI9340 library seems to be incomplete (i.e., not finished). There's a function called commandList, but the only reference to it that I find is commented. out.

How did people get this to work when it's such junk? Or am I missing some setting?

About This Instructable



More by tomk11:TFT Environment Monitor using BMP180 & DHT11Cheap TFT 2.2 inch Display on Arduino (ILI9340C or ILI9341)
Add instructable to: