How to get 2.2 TFT work on Arduino mega 2560

Hi everyone,

First of all sorry for my bad english.

I am new to arduino world and have got my self "2.2 Serial SPI TFT Color LCD Module" LINK

After reciving the product I discoverd that the display works on 3.3v Logic and that my arduino (arduino mega2560) ouput pins are 5v.
I have been trying to find solution on google, but without luck.

My problem is that I don't have level shifters (I orderd few but its going to take 2 weeks until it arrives).
From my understanding I can make my own level shifter using Resistors to make the screen work. But how I don't know. I found few small pictures, not clear enough to see what happends.

One of the store comments says: "...Use 47K resistors for connections to all the ports (MISO, MOSI, RST, CS, CD) because the board is 3.3V and Arduino is 5V by default. Connect Vcc and LED to the 3.3V connector...", I tried this but did not work for me. Some also say use 4.7k resistor istead of 47k.

So, thats why i decided to ask help from you guys. Could someone please help me out.

"How to get 2.2 TFT work on Arduino mega 2560 without level shifter(s)" ?

Thank you all in advance!

Firstly that display will not work with 5V logic even with series protection resistors.

You must either:

  • Use a 3.3V Arduino
  • Use level shifters

You may find my Instructable here a good starting point. You have the "2.2" TFT QVGA 240x320" display and hence need to use that library.

For the Mega you will need to change the sketch to use different pins to the UNO and wire them up in place of the referenced UNO pins:

#define sclk 52

#define mosi 51

#define cs x

#define dc y

#define rst z

Where x y and z are digital pins you choose.

The trick with Google searches (for minority topics like this one) is to select the search words carefully!

rowboteer:
Firstly that display will not work with 5V logic even with series protection resistors.

*snip

Thank you very much! Going to try it out tonight :slight_smile:

On the instructables it says:

You can also now use the 2.2" QVGA TFT SPI display based on the ILI9341 driver. To use this display load the Adatfruit_IL9341_AS and Adafruit_GFX_AS libraries. Connect the display to the UNO as follows:

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 8 through a 1K2 resistor to display pin 5 (DC/RS), add a 1K8 resistor from display pin 5 to GND
UNO digital pin 9 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
It is important to include the 1K8 resistors to GND with this 2.2" display as otherwise it will not work. The 1K2 and 1K8 resistors are a "potential divider", acting as a logic level shifter so that the logic level at the display is reduced from 5V to around 3V. Pin 9 of the display does not need to be connected up.

But I don’t have the 1k2 and 1k8 resistors. The lowest I got is 1k resistor. Any other resistors that may work ? Or do i need to wait up my order of level shifters :(?

Could someone please noob translate this for me?
http://cdn.instructables.com/F3U/U936/I0H8ZOXC/F3UU936I0H8ZOXC.LARGE.jpg

For 1K resistors: 2K resistors
Voltage drop: 5V to 3.3V

Voltage divider calculator

MEGA + ILI9341 2.4" touch

PD: ILI9341 family

TFTLCDCyg:
For 1K resistors: 2K resistors
Voltage drop: 5V to 3.3V

Voltage divider calculator

MEGA + ILI9341 2.4" touch

PD: ILI9341 family

Very nice I will be studing the calculator. Do you have any diagram of the pictures?

ArduinoStarter2015:
But I don't have the 1k2 and 1k8 resistors. The lowest I got is 1k resistor. Any other resistors that may work ? Or do i need to wait up my order of level shifters :(?

Could someone please noob translate this for me?
http://cdn.instructables.com/F3U/U936/I0H8ZOXC/F3UU936I0H8ZOXC.LARGE.jpg

Other resistors will work, those happened to be the ones I had in the box. Keep the ratio about the same. If you have lots of 1K resistors then replace 1K2 with 1K and 1K8 with two 1K in series!

The picture is not what you want, MISO is the Master In Slave Out signal that is driven from the display. The circuit is odd too, a 1K in series will be OK as the display will output a 3V3 logic signal. MISO is only needed if you wire up the SD Card or want to read pixel data back from the display.

rowboteer:
Other resistors will work, those happened to be the ones I had in the box. Keep the ratio about the same. If you have lots of 1K resistors then replace 1K2 with 1K and 1K8 with two 1K in series!

The picture is not what you want, MISO is the Master In Slave Out signal that is driven from the display. The circuit is odd too, a 1K in series will be OK as the display will output a 3V3 logic signal. MISO is only needed if you wire up the SD Card or want to read pixel data back from the display.

Thank you very much! I will try this.

rowboteer:
Other resistors will work, those happened to be the ones I had in the box. Keep the ratio about the same. If you have lots of 1K resistors then replace 1K2 with 1K and 1K8 with two 1K in series!

The picture is not what you want, MISO is the Master In Slave Out signal that is driven from the display. The circuit is odd too, a 1K in series will be OK as the display will output a 3V3 logic signal. MISO is only needed if you wire up the SD Card or want to read pixel data back from the display.

It works! It works on 5v aswel as on 3.3v. Is it safer to leave the vcc and led on 3.3v? Or does it not matter?

Result! Well done!

The display has a 5V to 3.3V regulator (reference designator U1 on the back) so it is safe to power from 5V.

The backlight signal line "LED" is connected to Q1 on the board so you can switch on/off with a digital pin to save power or to PWM the line to have an adjustable brightness.

Next you will probably want to get the SD Card going :slight_smile: so read my Instructable here.

rowboteer:
Result! Well done!

The display has a 5V to 3.3V regulator (reference designator U1 on the back) so it is safe to power from 5V.

The backlight signal line “LED” is connected to Q1 on the board so you can switch on/off with a digital pin to save power or to PWM the line to have an adjustable brightness.

Next you will probably want to get the SD Card going :slight_smile: so read my Instructable here.

I already used your sample for loading image from flash :wink:

Very nice done! Thank you very much for the help

Great to hear that. I wish you success with your future projects.

I recently got this 2.2 display. Couldn’t find any schematics for it, this post is super helpful. Rowboteer would you happen to know what J1 jumper is for?
Also would you you happen to know if LED needs an external resistor?
Here’s pick of back from mine…
EDIT: I realized that U3 is footprint for Flash chip! How cool is that! It even has it’s own CS line, so you can have both SD card and Flash!

bratan:
Rowboteer would you happen to know what J1 jumper is for?
Also would you you happen to know if LED needs an external resistor?

J1 is to bypass the 5V to 3.3V regulator, so it could be powered from 3.3V directly.

Transistor Q1 switches the LED on/off and has a base resistor R4 so the transistor can be driven directly from a logic line connected to the LED pin. The LED control pin connects to the transistor switch and hence does not directly power the LEDs, so you could PWM this pin to control the brightness.

Lastly you can buy FLASH chips to populate U3.