Problem driving 4.0 inch IPS RGB Interface 480x480 TFT Touch Screen Panel
I attempted to use this screen to create a control panel with LVGL, but I failed get it to show anything.
This is screen I use:
yuyinglcd.com/en/products/1/4/245
This is the development board I used, ESP32-S3-WROOM-1-N16R8, FLASH size is 16MB,PSRAM size is 8Mb. This is part of the schematic diagram, including the LED backlight:
The driver IC is ST7701s and touch IC is FT6336U
The FPC connector of the screen module is the same as above.
Pin no. | Symbol | Function |
---|---|---|
1 | A | Anode of LED backlight |
2 | K | Cathode of LED backlight |
3 | K | Cathode of LED backlight |
4 | GND | Ground |
5 | VCI | Power supply |
6 | RESET | When /RESET is set to “L”, the register settings are initialized |
7-8 | NC | DUMMY |
9 | SDA | Serial input data |
10 | SCK | Serial input clock |
11 | CS | Chip select signal. When /CS = ‘L’, the chip select becomes active, and data/command I/O is enabled |
12 | DCLK | Dot clock signal |
13 | DE | Data enable input in RGB interface |
14 | VSYNC | Vertical SYNC signal |
15 | HSYNC | Horizon SYNC signal |
16-33 | DB0-DB17 | Data bus |
34 | GND | Ground |
35 | TP_INT | TP break off; interrupt; suspend |
36 | TP_SDA | TP serial input/output signal in serial interface mode |
37 | TP_SCL | TP In Serial Interface, this is used as SCL |
38 | TP_RESET | This signal will reset the device and must be applied to properly initialize the chip |
39 | TP_VCI | Power supply, 2.8–3.3V typ |
40 | GND | Ground |
This is the yaml configuration I wrote:
esphome:
name: lcd
friendly_name: LCD
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
encryption:
key: "T/8n+bsdV0R83UkdGOrW70uSPoMhEls8hNTNgQQ7leE="
ota:
- platform: esphome
password: "03888d263616966f60ad7cde08c141a6"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lcd Fallback Hotspot"
password: "VUT39O2F64iI"
captive_portal:
# SPI (initialize ST7701)
spi:
mosi_pin: GPIO39
clk_pin: GPIO38
# Example minimal configuration entry
display:
- platform: st7701s
id: lcd
spi_mode: MODE3
color_order: RGB
dimensions:
width: 480
height: 480
cs_pin: GPIO45
# reset_pin: GPIOXX
de_pin: GPIO47
hsync_pin: GPIO14
vsync_pin: GPIO21
pclk_pin: GPIO48
data_pins:
red:
- GPIO0 # DB1
- GPIO12 # DB2
- GPIO11 # DB3
- GPIO10 # DB4
- GPIO9 # DB5
green:
- GPIO46 # DB6
- GPIO3 # DB7
- GPIO20 # DB8
- GPIO19 # DB9
- GPIO8 # DB10
- GPIO18 # DB11
blue:
- GPIO17 # DB13
- GPIO16 # DB14
- GPIO15 # DB15
- GPIO7 # DB16
- GPIO6 # DB17
# touch FT6336
i2c:
sda: GPIO42
scl: GPIO41
scan: true
touchscreen:
platform: ft63x6
id: my_touch
interrupt_pin: GPIO5
# backlilght
output:
- platform: ledc
pin: GPIO13
id: backlight
light:
- platform: monochromatic
output: backlight
name: "LCD Backlight"
id: lcd_backlight
# LVGL config
lvgl:
displays:
- lcd
touchscreens:
- my_touch
widgets:
- label:
align: CENTER
text: "Hello, LVGL!"
Can anyone help me find out where is the problem? Is the display platform I used correct?
Really appreciate!