IL9341 TFT Display 2.2"

Hi,

I am reworking an old project that uses a 2.2 TFT SPI display (240x320).

I project requires me to connect the display to an Arduino Nano D8 -> SCK, D7 ->SDI and D6 -> RS

I have existing code which I am sure that was working earlier with the following line
Ucglib_ILI9341_18x240x320_SWSPI ucg(/sclk=/ 8, /data=/ 7, /cd=/ 6 , /cs=/ 4,
/reset=/ 3);
I have used a voltage divider on the three pins for 5V to 3v3.

I need D4 and D3 for other functions (buttons).

All I am getting is a white screen, the program compiles ok but no text is displayed.

Could someone please help?

Thank you for your time

/StarKnight

I think you wanted to have those words inside the parameters to be commented-out... like this:

Ucglib_ILI9341_18x240x320_SWSPI ucg(
  /*sclk=*/  8,
  /*data=*/  7,
  /*cd=*/    6,
  /*cs=*/    4,
  /*reset=*/ 3);

Hi xfpd,

Cheers, tried that out no luck. :frowning: I'm afraid.

/StarKnight

There are five signal pins i.e. SCLK, MOSI, CD, CS, RESET

Use proper logic levels and it will work with every ILI9341 SPI library. e.g. Adafruit_ILI9341.h

David.

Hi David,

Unfortunately the other pins are all in use.
D2, D3, D4, D5 are used for switches.

D9,D10,D11 and D12 are used to control the DDS

A0-A7 are all required to meet other functions so - D6,D7 and D8 are really the ones I have.

This was working earlier way back in 2017/2018 and the line of code is from the final version I used, so unless something in the library has changed.

The code was written for the ucglib and thus I'm trying not to redo the work.

Many thanks,

/StarKnight

My point was that you should put level shifters on the other two signals.

The actual wiring is not important. You are using SW SPI. i.e. you want it to be slow. (but work)

Hi David,

I do not understand where the other lines could get the pins connected to? They are in use, and the strange thing was that this was working earlier.

Will have to check if the code was changed?

Best regards,

/StarKnight

Cannot Reset and, If there are no other SPI devices, CS be "tied high" (conn'd to Vcc)?
(Reset is, I think, active-low, "/R".)

The Reset signal must be 3.3V logic. (active-low)
The CS must be 3.3V logic. (active-low)
The DC must be 3.3V logic.
The MOSI must be 3.3V logic.
The SCK must be 3.3V logic.

Yes, you can just use a pullup to 3.3V for Reset (and use ILI9341 Software Reset Command)
Yes, you can just use a pulldown to GND for CS (if it is the only SPI device on the bus)

David.

@david_prentice
Thanks for the second.

@StarKnight
Your work is cut out for you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.