Bodmer / TFT_eSPI

Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
Other
3.82k stars 1.1k forks source link

ESP32+ ST7796 320x480 display white screen #3247

Open Apprisco opened 8 months ago

Apprisco commented 8 months ago

Hi all, I'm using an esp32s2 Saola DevKit R, and it seems to be working properly. I have connected a 4 inch 320x480 SPI ST7796 320x480 to it, and configured the user_setup and wrote it properly.

define ST7796_DRIVER

define TFT_MISO 10

define TFT_MOSI 7

define TFT_SCLK 9

define TFT_CS 12 // Chip select control pin

define TFT_DC 11 // Data Command control pin

define TFT_RST 13

define TFT_BL 8 // TFT backlight pin

define TFT_BACKLIGHT_ON HIGH

define SPI_FREQUENCY 20000000

define SPI_READ_FREQUENCY 20000000

user setup above

I have confirmed that changing the backlight on high/low does affect the screen brightness, which is perfect. However, I cannot get ANY image to properly display on this display. The screen remains the original color, white. TFT.fillscreen does nothing as well. Do you have any ideas?

FengKuangDeJieKeSi commented 8 months ago

Mine is the same, I use 9431 driver, modify the register, can display, but the TFT function sometimes stuck

FengKuangDeJieKeSi commented 8 months ago

The 7796 register address in the TFT library is similar to that provided by the manufacturer, but the register modified into that provided by the manufacturer cannot be displayed normally

//The following is the pin definition //#define TFT_MISO 19

define TFT_MOSI 37 //23

define TFT_SCLK 36 //18

define TFT_CS 38 //14 // Chip select control pin

define TFT_DC 35 //27 // Data Command control pin

define TFT_RST 47 //33 // Reset pin (could connect to Arduino RESET pin)

define TFT_BL 48 //32 // LED back-li