2.8" TFT (ILI9341) from BuyDisplay on Yun w/ adafruit GFX library

Hi All,
I've scoured the internet and forums but cannot find a solution to my problem, so I was hoping someone on here would have the answer. I purchased 2.8"TFT Touch Shield for Arduino w/Capacitive Touch Screen Module (link) to use with my Arduino Yun. I was hoping to use the GFX library and ILI9341 libraries from adafruit, but can't get any output on the LCD when running the graphicstest sketch from adafruit. It seems pretty straightforward, but I guess it's not! The TFT is configure for 4 wire SPI, which i have the MOSI and SCK connected to the ICSP on the Yun.

Is this even possible? Has anyone used either library (one from ADAFRUIT or BUYDISPLAY.com) on the YUN?

Any input/advice would me most helpful.

Thanks in advance!

Hi, welcome to the forum.

The first problem to correct is that the display expects 3.3V logic levels but the Yun outputs are 5V. Thus even if you get the connections and software correctly configured it will not work as the ILI9341 controller does not operate if it is driven with a 5V logic signal. Did you choose the 5V supply option for the display?

Secondly the ICSP connector does not provide all the signals needed to drive the display, you need to connect the following up as a minimum:

Power to the display e.g. +5V and 0V (I assume you chose the 5V option!)
Plus all these via a logic level shifter:
MOSI
SCK
D/C (Data/Command)
CS (Chip select)
RESET

Optionally you can connect the MISO line directly to the TFT or via a 1K Ohm protection resistor (Protects against accidentally making MISO an output with a sketch.

You can see how to use resistors as a level converter here. This will get your display running with the Adafruit libraries.

If you want to interface with the display's onboard SD card slot on the display then you may need to employ proper level converter devices but I would start by using resistors to get you going.

If there is anything I have suggested that you do not understand then ask.

1 The Power supply in your TFT it is 3V3 or 5V?. If it´s 3V3 you need a level shifter or voltage dividers in CS, SCK, D/C, RESET MISO and MOSI

2 Try first with UTFT library in order to get the wiring. In the Demo_ILI9341_Series example, they show this options

//UTFT myGLCD(ER_TFTM028_4_3I,7,8,9,10);                // TFTM028-4       3-wire 9-bit data serial interface I      SDA(PIN27),  SCL(PIN24),  /CS(PIN23),  /RST(PIN21)
//UTFT myGLCD(ER_TFTM028_4_4I,7,8,9,10,11);                // TFTM028-4    4-wire 8-bit data serial interface I      SDA(PIN27),  SCL(PIN24),  /CS(PIN23),  /RST(PIN21),  D/C(PIN25)
//UTFT myGLCD(ER_TFTM028_4_3II,7,8,9,10);                // TFTM028-4     3-wire 9-bit data serial interface II      SDI(PIN27)(data input,SDO not used),  SCL(PIN24),  /CS(PIN23),  /RST(PIN21) 
//UTFT myGLCD(ER_TFTM028_4_4II,7,8,9,10,11);                // TFTM028-4    4-wire 8-bit data serial interface II      SDI(PIN27)(data input,SDO not used),  SCL(PIN24),  /CS(PIN23),  /RST(PIN21),  D/C(PIN25)

Tutorial(2): arduino libraries+examples

3 Then with the correct wiring, you can try it with the ILI9341_due library or the ILI9341_Adafruit library

This is the interfacing

Thanks All, I re-read the data sheet and no matter what the supply voltage is, the input signal voltages are rated at 3.3V, so I'll try that first. I'll post an update tonight!

rowboteer:
Hi, welcome to the forum.

The first problem to correct is that the display expects 3.3V logic levels but the Yun outputs are 5V. Thus even if you get the connections and software correctly configured it will not work as the ILI9341 controller does not operate if it is driven with a 5V logic signal. Did you choose the 5V supply option for the display?

Secondly the ICSP connector does not provide all the signals needed to drive the display, you need to connect the following up as a minimum:

Power to the display e.g. +5V and 0V (I assume you chose the 5V option!)
Plus all these via a logic level shifter:.....

So, connected the 5V signals you suggested above using a zenner diode level shifter (5V input signal ->220 ohm resitor in series -> Diode to GND and 3.3 output between diode and resistor) But still no dice. i'm trying to run the graphicstest sketch from the adafruit library....I see that reset is optional, and i left MISO open. Is there anything else I'm missing?

Thanks again!!

Try to wire up the reset, it helps on some of the ILI9341 displays.

+1.

Not only should you wire up the RESET pin, you should use it in the constructor().

David.

It looks like the RESET is not needed as the display data sheet say's "R/C reset on board". I would use it however as if the +5V line comes up more slowly than the R/C rise time or it browns out (dips briefly) the display might not get a proper reset when needed. Once you get the display working you can try disconnecting it.

These 4 lines need level conversion (and the RESET if you use it):
LCD_/CS is Chip Select and must be connected, choose a line not used by the Yun already!
/WR(D/C) is Data/Command and must be connected, choose a line not used by the Yun already!
LCD_SDO should be connected to Yun MISO
D/C(SCL) is the SPI clock line and should connect to the Yun SCK

To turn on the backlight LEDs:
BL_ON/OFF should be tied to +3.3V to enable the LED backlight

To power the board (I hope you got this right!):
VSS = 0V
VDD = 5V (5V option only) or 3.3V

Some Zeners need a high bias current but 220R should be OK, and of course must be connected the correct way around (Anode to ground and Cathode (Bar marked end) is the logic line. Do you have a multimeter to check the 3.3V logic level is being reached?

success! I switched to a simple voltage divider and quintuple checked the connections and voila! Thank you for all your help everyone! I think I still need to port to the Due + Yun shield since I don't have enough IO to run the touchscreen/SD and all of my sensors on the due.