ILI9341 SPI Ebay Displays

Hi All,

I know that this has been asked many times before, but I can't seem to get these working.

I am using a logic converter but still can't get it working. If I supply the Arduino with a 4.5v PSU causing it to run 3v3 logic, it works, but I know that's not ideal.

Wiring for the logic converter;

HV ---- Arduino 5V
LV ---- Arduino 3V3
GND ---- Tied Ground

HV1-HV5 to Arduino SPI Pins
LV1-LV5 to Display SPI Pins

VCC and LED I have tried with both 3V3 and 5V with no change in behavior.

I am fairly new to this, so any help would be very much appreciated.

Thanks in advanced.
Fady

Personally, I run the AVR at 3.3V. No need for any level shifter.

I have never tried 5V with that style of level shifter module but I do have some of those modules.
I would expect them to work fine with an AVR 8Mhz SPI. Less likely with 40Mhz or 80Mhz SPI.

Post a photo of your wiring.

David.

Thanks mate, pictures attached.

Fady

Seriously. Just strip the breadboard down to Mega + TFT. Show which colour wire is going to which SPI pin i.e. D50-D53. Which colour goes from DC, RST to which digital# pins.

I am pleased that you use different coloured wires. It still comes down to correct routeing.
If your photo shows this clearly foreign eyes can spot a problem. e.g. if wires are pulled straight.
If you document your wiring colour scheme it makes it easier for a remote observer.

At the end of the day, my wiring is 9 wires from TFT board to 3.3V Seeeduino.
Your wiring would be 9 wires from TFT. 6 of them via level-shifters to 5V Mega.

I never use trailing wires. I always make an Adapter with a Protoshield. Protoshield wiring is soldered.

David.

Hi Mate,

Sorry about that, Clearly that was never going to make much sense to anyone else but me. :slight_smile:

Description of the way it’s cabled up.

Colour - TFT - Level Converter - Arduino

red VCC N/A 5V
Black Gnd N/A Gnd
Yellow CS LV5/HV5 55
Grey Rst LV4/HV4 46
White DC LV3/HV3 47
Blue MOSI LV2/HV2 51
Green SCK LV1/HV1 50
Purple LED N/A 5V

Thanks
Fady

But hardware MOSI on a Mega2560 is D51 (PB2)
and hardware SCK is D52 (PB1)
and hardware CS is D53 (PB0)

Yes, several ILI9341 libraries provide both Software and Hardware constructors.
You can use any pins you like in the Software SPI constructor. However your choice will b*gger all the other SPI devices that you might have on the SPI bus.

With your wiring scheme the Adafruit_ILI9341 constructor would be:

//        Adafruit_ILI9341(int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1);
        Adafruit_ILI9341(55, 47, 51, 50, 46, -1);  //always use EVERY argument

David.

Sorry Mate,

I have no idea why I did that (3 hours sleep maybe), but you are correct, CS is on D53 and SCK on D52. Hardware SPI is working.

Interestingly enough, I just hooked up a second screen sharing MOSI and SCK with screen1, independent CS, RST and DC. they now both work when the Arduino is powered via USB (with one screen attached, it would turn white as soon as I plugged the Arduino into USB).

Cheers,
Fady

can you pls help me
my ebay display is lgdp4524
can you send suitable library for it.