Closed chris-at-redfernsolutions closed 1 year ago
The S2 has been tested with for SPI displays only.
The original ESP32 and ESP32 S3 can be used with 8 bit parallel screens.
I will update the ReadMe with a table later to show which processor and which interfaces are supported for each.
I have had a look at the ESP32 code and I see that the code for running the ESP32 S2 with a parallel 8 bit display is present and looks correct so it should work. However I have not tested it so I will connect up a display and see if it needs any changes.
I have connected up and tested 2 displays (ILI9341 and ILI9481) with an 8 bit parallel interface and they work fine. I do not have an ST7789 with a parallel interface to test but world expect it to work. This is my setup file:
#define ILI9341_DRIVER
//#define ILI9486_DRIVER
#define TFT_PARALLEL_8_BIT
#define TFT_RST 9
#define TFT_CS 10
#define TFT_DC 11
#define TFT_WR 12
#define TFT_RD 13
#define TFT_D0 1
#define TFT_D1 2
#define TFT_D2 3
#define TFT_D3 4
#define TFT_D4 5
#define TFT_D5 6
#define TFT_D6 7
#define TFT_D7 8
#define LOAD_GLCD
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF
#define SMOOTH_FONT
I have also now run the TFT_ReadWrite_Test and it works fine too.
The ST7789V has been tested with an ESP32 S3 with 8 bit parallel interface so I would expect your setup to work. This all suggests there is an electrical problem with your setup.
Hi Bodmer, thanks for testing this.
In the file TFT_eSPI.h, which processor did you have defined for testing the ESP32-S2?
#if defined(CONFIG_IDF_TARGET_ESP32S3)
#include "Processors/TFT_eSPI_ESP32_S3.h"
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
#include "Processors/TFT_eSPI_ESP32_C3.h"
#elif defined (ESP32)
#include "Processors/TFT_eSPI_ESP32.h"
#elif defined (ARDUINO_ARCH_ESP8266)
#include "Processors/TFT_eSPI_ESP8266.h"
#elif defined (STM32)
#include "Processors/TFT_eSPI_STM32.h"
#elif defined(ARDUINO_ARCH_RP2040)
#include "Processors/TFT_eSPI_RP2040.h"
#else
#include "Processors/TFT_eSPI_Generic.h"
#endif
This is the include file, it supports both ESP32 and S2:
Issue
We are trying to use this ST7789-based display on a custom board based around the ESP32-S2. The diagnostic
examples/Tests and diagnostics/TFT_ReadWrite_Test
fails to read data back.Wiring
Our wiring is like so:
Note that our connector is flipped 180°, so pin 24 on our schematic corresponds to pin 1 on the datasheet:
LEDA
LEDK
GND
VDD-2V8
VDDIO
IMI/2
RESET
CS
D/C
WR
RD
SDA
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
TE
NC
GND
GND
The connector orientation is correct because we can manually GPIO the backlight to turn it on:
Configuration
Our firmware versions are:
TFT_eSPI
We only have access the 'parallel' (8080) IO mode, because
IMI/2
is permantently tied to ground. Thus, ourUser_Setup.h
contains:Testing
Attached are our
.ino
andUser_Setup.h
files: example.zipThe sketch
examples/Tests and diagnostics/Read_User_Setup
gives the following output:The sketch
examples/Tests and diagnostics/TFT_ReadWrite_Test
gives this output:When powered on while running the
TFT_ReadWrite_Test
, the LCD backlight initially turns on showing a grey screen. The display then subtly alternates in brightness about 10 times over the course of 2 seconds. This suggests that the display is at least receiving some commands!Debugging attempts
Changing
tft.fillScreen(TFT_BLACK);
toTFT_RED
orTFT_WHITE
has no discernible effect.As suggested in this thread, we tried switching from
ST7789_DRIVER
toST7789_2_DRIVER
inUser_Setup.h
. This had no effect.As per this thread, we attempted:
ST7789_Driver
toILI9486_DRIVER
[no effect]tft.begin()
aftertft.init()
in our.ino
sketch [no effect]TFT_SDA_READ
[no effect]Additionally, could someone clarify if extra work is required to make the library work with an
ESP32-S2
, or is it automatically detected? I noticed that some parts of the library are specifically written forESP32-C3
/ESP32-S3
etc. but there is little mention of theS2
.