8 Pin SPI ILI9341

Hello guys!

I have bought today an ILI9341 Display and an Arduino Nano.

My problem is that Display's SPI is different than all from examples and tutorials that I found on internet and I can't figure out how to wire the display with the board.

It's my first interraction with an LCD and I don't know pins's abreviations very well.

|500x500

I tried to look at the documentation from Arduino's site (https://www.arduino.cc/en/Reference/TFTLibrary) and set the background color to blue and my very first problem is that I can't find the CS pin, pin used in all tutorials that i have seen.

Please someone explain me where I can find an example with this SPI or how to connect to board. Thank you in advance!

Where did you get this screen? Can you provide a link?

I can't believe that any SPI device could work reliably without a /CS pin. One isolated glitch on the SCK line would render the whole SPI sequence out of sync.

David.

Thank for your response!

It's a similar product only that mine is 2.4 inch: https://www.aliexpress.com/item/SPI-ILI9341-drive-LCD-module-240-320-8-pins-HD-color-display-panel-2-8-inch/32794973266.html?spm=2114.search0104.3.18.4x1GVv&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10065_10151_10068_10344_10345_10342_10343_10340_10341_10541_10304_10307_5670020_10301_10060_10155_10154_10056_10055_10539_10537_10536_10059_10534_10533_100031_10103_10102_10142_10107_10171_10562_10084_10083_10561_5650020_5740017_10312_10313_10314_5660020_10550_10073_10551_10552_10553_10554_10557,searchweb201603_2,ppcSwitch_7&btsid=2d01b511-9897-4685-9342-200dea499c5e&algo_expid=4eeb6775-d332-48b2-8364-737e3cbf63f7-2&algo_pvid=4eeb6775-d332-48b2-8364-737e3cbf63f7

A closer look: https://ibb.co/dpXkiG

The text in the link clearly describes all 8 pins.

I just don’t believe it is wise to omit CS.

From a numbers point of view, the ILI9341 can work in 9-bit SPI avoiding DC
The ILI9341 can work with a bidirectional SDA pin in both 8-bit or 9-bit mode avoiding MISO.
The ILI9341 can use a Software Reset command, avoiding RES

It should be possible to work without CS but you could lose sync.

Just connect pins to a 3.3V SPI, 3.3V GPIO Arduino. e.g. Zero, Due, Teensy3, STM32, …
Run examples from a regular ILI9341 SPI library. Most are expecting 4-wire SPI + DC, RES.

I suspect that one of the pins is mis-named. e.g. RES or DC might be CS.
But I would try regular libraries first. (just omit the CS wire)

David.

I succeed figured out with this SPI.

GND <-> GND;
VCC <-> 5 V;
CLK <-> Digital pin 13;
MOSI <-> Digital pin 11;
RES <-> Digital pin 8;
DC <-> Digital pin 9;
BLK <-> 5 V;
MISO: do not connect;

And use ucglib.h and for every example initiate the ucg object like this:

Ucglib_ILI9341_18x240x320_HWSPI ucg(/cd=/ 9 , /cs=/ 10, /reset=/ 8 );

The pin descriptions are correct. The CS pin must be hard-wired as active low. And yes, the ILI9341 will work with CS permanently low.

Looking at the timing diagrams in the datasheet, the DC pin is only valid during the 8th bit. So I suppose that you could periodically synchronise with the DC bit but it seems far less straightforward than using CS for sync.

Note that you will NOT be able to have any other devices on the SPI bus.
Most ILI9341 displays have an SD and XPT2046 Touch Controller. i.e. three SPI devices on the same bus.

Hey-ho, it will be interesting to hear if you get glitches after the app has been running for a few days.

David.