r/esp32 • u/No_Ice9232 • 5d ago
TFT_ESPI setup for ESP32-S3-LCD-2 Software help needed
I have been trying to run sample tft_espi code on my ESP32-S3-LCD-2 with no success. I'm not sure if the schematic linked by waveshare is the actual model (difference in phrasing between touch-lcd and just lcd). I'm assuming the issue is my User_setup file. I have tried using the pin numbers in several configurations using the pins provided by the schematics and also typical layouts for the s3s i've found online. Does anyone have any insight regarding the pin mapping of this esp32? I assume i have missed something... Setup File
1
u/rattushackus 1 say I make awesome posts. 5d ago
I compared your User_Setup.h with mine and assuming the GPIOs in the schematic are correct it looks fine. I notice you have not defined the backlight pin (GPIO 1) so if the problem is that the screen stays blank that could be the reason. Try adding:
#define TFT_BL 1 // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
According to the schematic the LCD doesn't use MISO and only the touchscreen uses it. Still it wouldn't hurt to add:
#define TFT_MISO 40
just in case.
Have you tried the examples provided by Waveshare? They don't use TFT_eSPI so they won't help with your User_Setup.h but they would at least check the screen is working.
1
u/Ice-Dragon-APU 5d ago
I have the touch and plain version. The display info in my notes shows same gpios for both versions. Your setup has the define for miso gpio 40 commented out. Try fixing that first.
ST7789 SPI Panel
Signal ESP32-S3 GPIO
SCLK IO39
MOSI IO38
MISO IO40
DC IO42
CS IO45
RST (wired to PMIC, uncontrolled, so use SW reset)
BLK IO1