Waveshare RPi LCD (Rev C)
This screen comes in 3.5" and 4.0" sizes.
6 GPIOs are required to drive the SPI display. One additional GPIO is needed for the XPT2046 touch sensor and one extra GPIO for backlight dimming. Including the VCC and GND pins, a total of 13 connections need to be made to the MCU:
Pin Configuration~
Pin | Function | ESP32 Pin | Config Name | Display Pin |
---|---|---|---|---|
1 | Module Power 3.3V | 3.3V | 3.3V | |
2 | Module Power 5v | 5V | 5V | |
3 | Not connected | NC | ||
4 | 5V | |||
5-10 | Not connected | NC | ||
11 | Touch Interrupt | NC | TP_IRQ | |
12 (*) | LED Backlight PWM | TFT_BCKL | LCD_LED | |
13 | Not connected | NC | ||
14 | Module Ground | GND | GND | |
15-16 | Not connected | NC | ||
17 | Module Power | 3.3V | 3.3V | |
18 | Data Command control pin | GPIO4 | TFT_DC | LCD_RS |
19 | SPI Master Out Slave In | GPIO23 | TFT_MOSI | LCD/SI/TP_SI |
20 | Not connected | NC | ||
21 | Touch Panel Slave Out | GPIO19 | TFT_MISO | TP_SO |
22 | LCD Reset pin | GPIO32 | TFT_RST | RST |
23 | SPI Clock | GPIO18 | TFT_SCLK | LCD_SCK/TP_SCK |
24 | Chip select control pin | GPIO15 | TFT_CS | LCD_CS |
25 | Module Ground | GND | GND | |
26 | Touch Chip Select | GPIO22 | TOUCH_CS | TP_CS |
SPI MISO, MOSI and SCLK are shared between the touch controller and the LCD controller.
Attention (*)
Only the WaveShare 4.0" RPi LCD Revision C has a solder jumper on the back to enable PWM backlight dimming. Other revisions of this board do not have this feature.
LCD Configuration~
The lcd_config.ini
file specifies the different properties of the display, except for the actual pin configuration:
1 2 3 4 5 6 7 8 9 10 11 |
|
HASP build_flags~
Specify the LCD Configuration to use and define the 7 GPIOs in the environment build flags:
1 2 3 4 5 6 7 8 9 10 |
|
Last update:
2022-06-04