2.8" TFT screen - pin issues

Hi all

Been trying to map the pins on this Chinese ILI9341 based screen.
Some of the demo examples don't work as usual, so just trying to dial in what the pins do.
Attached are the schematics...

Now if I change the screen definintions to the following, the screen works (and so does the touchscreen using pin 33)...

Its based on an ESP32

// Required libraries
#include <SPIFFS.h>
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <SPIFFS_ImageReader.h>

#define TFT_CS 15                                              /* TFT connections For 2.8" ESP32 WROOM 32 touchscreen*/
#define TFT_DC 2
#define TFT_MOSI 13
#define TFT_MISO 12      // How can this be the same a RST ?
#define TFT_CLK 14
#define TFT_RST 12
#define TFT_BL 21
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);

But, the TFT_MISO pin and the TFT_RST pin are declared the same, and they don't seem to marry up with the schematic very well either.

Does MOSI = SDI?
Does MISO = SDO?
Does RST = DC?

I really wish they would use the same goddam pin names.


OK, if I uncomment pin 12, it still all works... so TFT_SDO isn't used?

// Required libraries
#include <SPIFFS.h>
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <SPIFFS_ImageReader.h>

#define TFT_CS 15                                              /* TFT connections For 2.8" ESP32 WROOM 32 touchscreen*/
#define TFT_DC 2         // This is used
#define TFT_MOSI 13
//#define TFT_MISO 12    // This can be deleted  
#define TFT_CLK 14
//#define TFT_RST 12     // This can be deleted
#define TFT_BL 21
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK);

Swearing doesn't help, because both are correct.

SDO means Serial Data Out. It is a general name used for serial data connections.
SDI means Serial Data In. It is also a general name used for serial data connections.

MOSI is an abbreviation for Master Out Slave In. It could be general, but is mostly used for SPI serial data.
MISO is an abbreviation for Master In Slave Out. It could be general, but is mostly used for SPI serial data.
Master is the master that controls the SPI connection and produces the SPI clock, (named SCK or CLK).
MOSI and MISO are named COPI and CIPO for some processors, for Controller and Peripheral.

If SDI and/or SDO is used together with CS and/or DC, then it is for a SPI bus most likely.

Many TFT displays don't use SDO/MISO, unless they have read capability, e.g. for controller ID.

Many TFT display don't really need RST. But some need at least a pull-up on RST.
RST of your display is connected to processor EN (RST) according to schematics.

BTW: almost all processors support HW SPI. For pins used see pins_arduino.h of the processor for use with Arduino IDE. Adafruit_GFX supports SW SPI, if you specify the SPI pins.

So much for now.

Jean-Marc

Added: please take a look around you:

Your schematics says: ESP-24S028
So maybe you should also read this post:
ESP32-2432S028R all in one display, Touch SPI problems.

In the Displays section of the forum, it helps if you provide a link to the device in question!

Added more: I have:

2.8 Inch Smart Display ESP32 for Arduino LVGL WIFI&Bluetooth 240*320 Screen LCD TFT Module With Touch WROOM
ordered: 31.12.2022, received: 17.1.2023

I had no time to play with it yet.

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