ILI9341 TFT display without exposed CS pin

Hello! I've bought an ILI9341-based TFT LCD that looks like this:

As you can see, there is no CS pin on the header. There is only GND, VCC, CLK, MOSI, RES, DC, BLK and MISO.

I've tried using Adafruit's examples for ILI9341, but the LCD only displays a white screen. The same happens with Ucglib.

I've connected and reconnected everything several times, but no success. The logic level converters that I'm using seem to be working properly (the voltages on the LV lines are very close to 3.3v, as expected).

The screen works since I'm able to use it with my Raspberry Pi 3 B (via the fbtft driver), but with Arduino it seems impossible.

Any ideas?

EDIT: Forgot to say that I'm using an Arduino MEGA 2560 R3.

It would be more useful if you showed a photo of the pcb.

Does it have series resistor packs or 74HC245 buffers?

David.

Yes, it has some resistors.

U2 looks like a transistor switch for the Backlight.
There is no AMS1117-3.3 regulator.

So your display is 3,3V only.

I suggest that you connect the display to a proper 3.3V board like Zero, Due, STM32, ...
And select SPI mode#3

If you want to use a weird 5V board like MEGA2560, you will need to provide:

  1. external 3.3V regulator.
  2. external level shifters for each logic signal (or series resistors)

Adafruit_ILI9341 should work with the software (bit-bang) constructor because it uses mode#3.
It will only work with the hardware SPI if you edit the Adafruit_SPITFT_Macros.h in the Adafruit_GFX library directory.

I have written this completely blind.
Please report back if my suggestions are correct.

David.

Edit. Found Touch version on Ebay
and your non-Touch version

They both look like 3.3V only. Neither have LDO regulators. Neither have suitable series resistors.

I'm using a 4-channel logic level converter, so the display gets 3.3v signals from the Arduino.
I've tried using both HW SPI and software SPI using Ucglib, but it doesn't work.
I'll try to use software SPI using Adafruit_ILI9341 (I've only used the HW SPI with this library).

You need 3.3V on VCC pin because there is no LDO regulator. A 2.8" backlight is probably only 40mA at 3.3V. The MEGA2560 3.3V regulator looks pretty wimpy to me but it should just manage ILI9341 + backlight.

3.3V regulators on Due, Zero, STM32 are designed to supply a reasonable working current.

You need level shifters for CLK, MOSI, RES, DC. BLK on my ST7789 is on with n.c. Leave MISO as n.c.
If you don't have enough level shifters, use resistor divider e.g. for RES.

David.

I've supplied 3.3v to the VCC pin.
Also, I have enough level shifters. I didn't connect it directly to 5v.

The display just refuses to talk with the Arduino board using HW SPI. I've also tried using the HW SPI pins as software SPI, but that didn't work either.

I'll try using other pins for the software SPI.

Show a photo of your wiring and schematic. Extra eyes can help.

Personally, I would connect as CLK, MOSI, RES, DC with level shifters. BLK n.c. MISO n.c.

Install up to date Adafruit_ILI9341 and Adafruit_GFX libraries via Library Manager.

Run the examples using full-fat constructor i.e. including RES argument.

I would select the physical hardware SPI pins. Then you can swap between software and hardware constructor.

If you have a Logic Analyser you can observe the SPI traffic. And monitor MISO too.

Until I got my ST7789 with missing CS, I could not understand how any SPI device could ever work without CS. The real surprise was Adafruit's use of SPI#3 for bit-bang and SPI#0 for HW SPI.

David.

Ok, the graphics test works fine using software SPI on other pins.
I'll have to figure out why it doesn't work with hardware SPI.

Thanks for your help!

It will only work with the hardware SPI if you edit the Adafruit_SPITFT_Macros.h in the Adafruit_GFX library directory.

Change to SPI mode#3. Hardware SPI should work ok.

If you have multiple SPI devices on the bus, use Transactions.

David.

I've got the HW SPI to work! It's WAY faster than software.

Thank you again!

Well done!

My ST7789 seems to keep in sync without a CS pin. However Read commands are very critical.
I suppose that I could experiment with ILI9341 w/o CS but all my hardware "adapter shields" are designed for CS.

Having a CS pin ensures that SPI is always kept in sync. It seems crazy to produce boards without CS.

Several other TFT and OLED controllers can operate without CS and with pauses in a write sequence.

Why did you choose this Blue display? The only advantage seems to be switchable Backlight.
Most of the common Red displays require an external switching transistor on BL.
Some do have an onboard transistor.
This means you can reduce the current consumption by Sleeping the ILI9341 and switching LED off.
Of course power saving is pointless with a MEGA2560.

David.

Edit. All the other ILI9341 libraries should work too. Just ensure mode#3

This was the only 2.8inch SPI display that was is stock. (I didn't buy it from ebay as it would have taken too much time to arrive in my country).

I don't use the BLK pin at all.

Well you can. Just connect a 3.3V GPIO pin to BLK.

You can switch the Backlight on and off with regular logic i.e. using less than 1mA
So you can control with an ARM or any other chip.

How much current is drawn by your display? I would expect to see good vibrant colours with 40mA backlight current.

David.

Edit. from #3:

U2 looks like a transistor switch for the Backlight.
There is no AMS1117-3.3 regulator.

You have the item on your desk. You can read markings, follow tracks and determine whether it is a transistor or LDO regulator. Chinese pcbs tend to call transistor Q1 and integrated circuit U1.

Setting the BLK pin LOW turns off the backlight. So yes, it works. The Arduino is not battery powered, so I'm not concerned about current consumption.

It draws about 45mA.

alexdev:
Hello! I've bought an ILI9341-based TFT LCD that looks like this:

As you can see, there is no CS pin on the header. There is only GND, VCC, CLK, MOSI, RES, DC, BLK and MISO.

I've tried using Adafruit's examples for ILI9341, but the LCD only displays a white screen. The same happens with Ucglib.

I've connected and reconnected everything several times, but no success. The logic level converters that I'm using seem to be working properly (the voltages on the LV lines are very close to 3.3v, as expected).

The screen works since I'm able to use it with my Raspberry Pi 3 B (via the fbtft driver), but with Arduino it seems impossible.

Any ideas?

EDIT: Forgot to say that I'm using an Arduino MEGA 2560 R3.

Hi, I have the same problem too. Host did you found any solution for this?
I tried to search for this problem at internet for a long time but still didn't get any solution yet. (T_T)
Really hope someone can help out, thanks in advance.

I have replied to a similar question in this thread

You should have no trouble with a 3.3V Arduino e.g. Zero, Due, ...
Or even an ESP8266, ESP32 board.

Write notes on paper describing what you have done.
Then type them in your message.

David.

I followed a instruction from internet, tried to use an Arduino Pro Micro to drive the 2.4 TFT ILI9431 Display which do not has a CS pin and got a blank white screen after uploaded the code.
The connection pin as below :

VCC - 3.3V (I get supply from a USB_TTL)
GND - GND from USB_TTL too.
Sclk - 15 (My TFT display only has CLK wondering any difference between both of them)
Miso - 14
Mosi - 16
Cs - 10 (I ignored for this pin config)
Dc - 9
Res - 8

Here is the Coding Part :

/***************************************************
This is an example sketch for the Adafruit 2.2" SPI display.
This library works with the Adafruit 2.2" TFT Breakout w/SD card
----> 2.2 18-bit color TFT LCD display with microSD card breakout [EYESPI Connector] : ID 1480 : $24.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Color definitions for TFT SPI 2.2" Display
ILI9340_BLACK 0x0000
ILI9340_BLUE 0x001F
ILI9340_RED 0xF800
ILI9340_GREEN 0x07E0
ILI9340_CYAN 0x07FF
ILI9340_MAGENTA 0xF81F
ILI9340_YELLOW 0xFFE0
ILI9340_WHITE 0xFFFF

Binary sketch size: 20,726 bytes (of a 28,672 byte maximum)
****************************************************/

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9340.h"

// Leonardo LCD Display UNO pins
#define _sclk 15 // J2 pin 7 13
#define _miso 14 // pin 9 12
#define _mosi 16 // pin 6 11
#define _cs 10 // pin 3 10
#define _dc 9 // pin 5 9
#define _rst 8 // pin 4 8

// Using software SPI is really not suggested, its incredibly slow
//Adafruit_ILI9340 tft = Adafruit_ILI9340(_cs, _dc, _mosi, _sclk, _rst, _miso);
// Use hardware SPI
Adafruit_ILI9340 tft = Adafruit_ILI9340(_cs, _dc, _rst);

void setup() {
Serial.begin(9600);
Serial.println("Adafruit 2.2" SPI TFT Test!");

tft.begin();

Serial.println(F("Benchmark Time (microseconds)"));
Serial.print(F("Screen fill "));
Serial.println(testFillScreen());
delay(500);

Serial.print(F("Text "));
Serial.println(testText());
delay(3000);

Serial.print(F("Lines "));
Serial.println(testLines(ILI9340_CYAN));
delay(500);

Serial.print(F("Horiz/Vert Lines "));
Serial.println(testFastLines(ILI9340_RED, ILI9340_BLUE));
delay(500);

Serial.print(F("Rectangles (outline) "));
Serial.println(testRects(ILI9340_GREEN));
delay(500);

Serial.print(F("Rectangles (filled) "));
Serial.println(testFilledRects(ILI9340_YELLOW, ILI9340_MAGENTA));
delay(500);

Serial.print(F("Circles (filled) "));
Serial.println(testFilledCircles(10, ILI9340_MAGENTA));

Serial.print(F("Circles (outline) "));
Serial.println(testCircles(10, ILI9340_WHITE));
delay(500);

Serial.print(F("Triangles (outline) "));
Serial.println(testTriangles());
delay(500);

Serial.print(F("Triangles (filled) "));
Serial.println(testFilledTriangles());
delay(500);

Serial.print(F("Rounded rects (outline) "));
Serial.println(testRoundRects());
delay(500);

Serial.print(F("Rounded rects (filled) "));
Serial.println(testFilledRoundRects());
delay(500);

Serial.println(F("Done!"));
}

************************************* Loop() removed due to length restrictions **************************

void loop(void) {
}

Sorry i totally don't have any knowledge for this. Hope you can give some advise. :confused:

That should work. But it is pretty inconvenient.

You disconnect all the TFT wires.
You plug the USB cable in to program
Unplug the USB cable
Connect all the TFT wires.
Connect 0V to GND, 3.3V to VCC.
Run the program.

God gave you 3.3V electronics.
Then Arduino punished you with 5V GPIO pins.

Personally, I would buy a 3.3V Arduino. Plug in one USB cable and away you go.

Yes, you can buy level shifters or resistors. Probably costs more than buying a proper 3.3V board.

David.

I had followed your instruction, unplug from TFT, rewrite program to arduino pro micro. Then connect everything back. But it still showing blank screen... :sob: