Skip to content

a simple demo with eSPI and LVGL resistance touch screen based on RP2040

Notifications You must be signed in to change notification settings

cnkoala/rp2040-eSPI-lvgl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A LVGL8 Demo based on RP2040

Chinese 中文

Structure

Hardware

Taobao CHINA purchase link. No body gives money for this ads. :)

Software

Performance

Performance

Settings

eSPI

; Platformio.ini

 -DILI9488_DRIVER=1
 -DTFT_WIDTH=480
 -DTFT_HEIGHT=320
 -DTFT_MOSI=11
 -DTFT_SCLK=10
 -DTFT_CS=9
 -DTFT_DC=8
 -DTFT_RST=12

As a PlatformIO project, most eSPI settings are defined on platformio.ini. Please check if you want to modify them.

NOTE: I use SPI channel 1 instead of channel 0, so I must write below in platformio.ini.

; Platformio.ini

-DTFT_SPI_PORT=1

XPT2046

Acorrding to the author's description, we just need define CS PIN for XPT2046 driver, and others PINS are automatically defined.

XPT2046

// main.cpp

#define CS_PIN 17

Then, we need connect the wires:

  • TOUCH_RX GP16
  • TOUCH_CS GP17(connect not in this photo)
  • TOUCH_SCK GP18
  • TOUCH_TX GP19

connect

Back lighting

We need set back lighting as a NONE-ZERO constant, or set int between 0 and 255. If you set nothing to it, you will see nothing display. As the demo, I set 150.

// main.cpp

#define TFT_BL 13
uint8_t TftBackground = 150;

About

a simple demo with eSPI and LVGL resistance touch screen based on RP2040

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published