LCD 2.8'' SPI ILI9341 - how to connect it to Mega/Uno

Hi I got LCD for my project:

LCD SPI ILI9341 240 * 320 2.8" SPI 5 wires (CS, RS, SCL, SDA, RST) for controlling.

SDO: Serial clock output LED: 3.4V Power Supply pin SCL: Serial clock input SDA / SDI: Serial data input DC: Data / Command selection RST: Reset, Low level active CS: Chip Selection, Low level active GND: Ground VDD33: 3.3V Power Supply pin UTFT Support http://henningkarlsen.com/electronics/library.php?id=52

I am wondering what woud I need to connect it to my Arduino Uno or Mega (have both). I make one project with 2.4 LCD - ID_S6D0154 chip and I used Adafruit_TFTLCD to draw - will it work with my new LCD? I see in code the 9341 chip:

//// LCD controller chip identifiers

define ID_932X 0

define ID_7575 1

define ID_9341 2

define ID_HX8357D 3

define ID_S6D0154 4

define ID_ILI9327 5

Uno and Mega have 3.3vcc ports and the LCD should be working at 3.3V as I understand. Moreover I read that the message logic also should be change so I would need CD4050 thing? I see something similar - which one would be ok?:

4051 DIP16 TEXAS CD4051BE 
CD4051BE DIL16
CD4053BE 4053 Muliplexer 3 x 2 kanały TI DIP16 x2
CD4020BE DIP-16 TI
=SB= 4050. układ cyfrowy CMOS SO16 CD4050

And finally, does anyone have some simple diagram how to connect all of this?

About the 4050, it functions as a level converter and is non inverting buffer. The other close cousin would be the 4049 BUT the 4049 inverts the logic. You could substitute another chip with some different wiring, but it would only be as a last resort. I really recommend you stick with the 4050. I mean you could wire two 4049 buffers end to end to get a non inverting buffer but it is kind of a terrible waste of space.

Use a magnifying glass on the chips mounted on the display. If you see something like "HC245" on the parts there is a good chance it already has taken care of voltage level conversion. In this case they used the CMOS equivalent of a 74LS245 buffer. Seems to be the most popular on the displays I have. A 4050 ID on the chips would mean the same thing.

Thanks for the reply, I ordered the lcd and now I am confused about the 4050 - I see CD4050, 4050 and in some article someone uses CD4050BE - are all these the same?

cd74hc4050 http://www.digikey.com/product-search/en?k=cd74hc4050&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25

arduHenry: Thanks for the reply, I ordered the lcd and now I am confused about the 4050 - I see CD4050, 4050 and in some article someone uses CD4050BE - are all these the same?

All essentially the same. To confuse the issue a little more :) usually the manufacturers add an abbreviation of their name i.e. ti for Texas Instruments and the letters that follow are a combination of speed grade and package i.e. surface mount or DIP. IIRC The hc in the one recommended by CrossRoads is an abbreviation for 'High speed CMOS'. For prototyping you need the DIP package.

"The ’HC4049 and ’HC4050 are enhanced versions of equivalent CMOS types." per the TI datasheets.

I received the LCD and I attached the picture of it with enlarged description of two symbols. So is there a 5v logic already implemented and can I connect it to Arduino Uno to 3.3v vcc or buy the CD4050 part?

I am also attaching pictures of 4050 currently available where I live, which would work perfectly?

cd4050bcm.jpg

cd4050be.jpg

mcy74050.jpg

74hc4050

This web page has the circuit schematic on the bottom. He used a CD4050BE BUT you would be better off using the HC version for the first prototype. One less thing to go wrong, you won't have to worry about the speed grade being too low.

http://gordonsprojects.blogspot.com/2014/04/arduino-tft-serial-spi-22-ili9341.html

Thanks, I ordered the 74hc4050, now I am searching right schema for connecting all of this. In the link above I see this comment:
" The LED pin can can be connected to 5v using a 100Ohms resistor directly if you don’t need to turn the back-light on and off. To enable the library on/off functionality I used a 2222 transistor via pin 7 of the Arduino."

I found the examples one 3.3v and second 5v that propably work… not sure…

There will be touch menu with some options to choose and back-light on/off functionality would be nice but not obligatory (if it can work 24h). It would be nice if it work fast enough so that user would touch many times the same option in menu.

So which schema would be best?

So I ordered 74hc4050 and they sent me 74hc4050n - does it differ? Can I connect it the same as on ili2.jpg picture?

And which pin is 1 - vcc? It hsa vertical description on it

Check the datasheet:

Did they send you a surface mount part instead of a DIP?

There is no such symbol in pdf that you posted, 74hc4050n.

It is dip, I put it on prototype board and connected everything as on picture ILI2.JPG. TOUCH pins are not connected - dont know how (t_iro, t_do, t_din, t_clk). Now I am searchin fora graphic library. The https://github.com/adafruit/TFTLCD-Library which I used on MCUFriends 2.4 LCD has this construtor: Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

This one https://github.com/adafruit/Adafruit_ILI9341

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

So they are quite different. Correct me if I am wrong but the second one seems to be for my LCD despite the fact that the first one has ILI9341 support in cpp files. Can I use the first one too?

I also tried this schema (attached) No resistor 22ohms, I connected LED to 3.3v directly. Screen is on but dark, nothing is drawn, it is blinking sometimes.

strange, I managed to get everything working (without touch screen yet - first tft), In the last diagram I gave I connected LCD GND to Mega GND directly and I connected MISO through 4050 (pin 4,5) to Mega pin 50.

Still the first way - hardware SPI gives white screen, the second one works slow..

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

Finally now it works as fas as a light: // Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC //// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC //Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

Instead of this I tried this constructor with correct TFT_RST pin number: Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);

Now I am searching for instructions as for the Touch Screen for my LCD model. Any help appreciated.

The original problem is solved, LCD is connected now, thank for help !!!