
ESP32 E-Paper Partial Refresh: Full Updates & Ghosting Fixes
Compare full, fast and partial e-paper updates. Diagnose residual digits, initialization after wake and panel-specific driver requirements.
ST7796 identifies the LCD controller. It does not identify the touchscreen controller. This guide starts with a separate SPI LCD module and a classic ESP32 development board; an integrated CYD or ESP32-S3 display board needs its own schematic and pin mapping.
Confirm the LCD is ST7796 and the module uses SPI rather than an RGB or parallel interface. Then read the touch-controller marking or supplier documentation. A capacitive controller commonly uses I2C; its address, reset and interrupt requirements depend on the exact part.
TOUCH_CS and XPT2046 settings do not configure an I2C capacitive controller. XPT2046 is a resistive-touch controller and belongs to a different setup. Do not copy resistive-touch definitions into a capacitive example.
Power off before wiring. The following pins are an example for a classic ESP32 DevKit with these GPIOs available, not a universal ST7796 pinout. ESP32 GPIO uses 3.3V logic. Supply the display at the voltage stated by the module documentation; a board that accepts 5V power is not automatically 5V tolerant on signals.
| LCD signal | Example ESP32 GPIO |
|---|---|
| SCK | 18 |
| SDI / MOSI | 23 |
| SDO / MISO, if exposed and required | 19 |
| LCD_CS | 27 |
| LCD_DC / RS | 26 |
| LCD_RST | 25 |
| GND | Common ground |
| VCC / LED / BL | Follow the module supply and backlight circuit documentation |
Backlight pins may need a control circuit. Do not assume an unknown LED pin can be powered directly from a GPIO.
Install TFT_eSPI and create one board-specific setup using the project’s configuration mechanism. Select only that setup; leave competing driver selections disabled. For the example wiring above, the essential display definitions are:
// Example ONLY: classic ESP32 DevKit + separate 3.3V-logic SPI LCD.
// Put these in ONE selected TFT_eSPI setup; match the actual module first.
#define ST7796_DRIVER
#define TFT_MOSI 23
#define TFT_MISO 19
#define TFT_SCLK 18
#define TFT_CS 27
#define TFT_DC 26
#define TFT_RST 25
#define LOAD_GLCD
#define SPI_FREQUENCY 20000000
The pin definitions must be visible when the library itself is compiled. Adding them only below the library include in an Arduino sketch will not configure an independently compiled library. Use TFT_eSPI’s Read_User_Setup diagnostic to inspect what was compiled; it does not detect the physical controller.
#include <TFT_eSPI.h>
TFT_eSPI tft;
void setup() {
Serial.begin(115200);
tft.init();
tft.setRotation(1);
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE, TFT_BLACK);
tft.setTextSize(2);
tft.setCursor(12, 12);
tft.println("ST7796 display check");
tft.drawRect(4, 4, tft.width() - 8, tft.height() - 8, TFT_GREEN);
}
void loop() {}
This source is a reference example, not a physical-unit test report. A visible border and legible text are the expected result after the supply, backlight and setup match the module. Check rotation and documented inversion/color-order requirements if the image is rotated or colors are wrong.
A successful I2C scan establishes an address response, not the identity of an unknown controller. Use CYD PlatformIO & LVGL workflow for the integrated-board workflow and the display-driver identification guide if the LCD model is uncertain.
| Problem | Check |
|---|---|
| White or unchanging LCD | Driver selection, SPI pins, reset, chip select, power and backlight |
| LCD works, touch does not | Separate touch-controller driver, I2C wiring, address and initialization |
| Touch is mirrored | Rotation and axis mapping; avoid applying the transform twice |
| Build reports LVGL type errors | Use one LVGL major version and its matching port/example |
The diagnostic sketch above compiled for esp32:esp32:esp32 with ESP32 Arduino core 3.3.0 and TFT_eSPI source revision 16e37595040e. The compiled configuration matches this page’s example. This confirms the build, not physical display or touch behavior.
4-Band Digital FM MW SW Radio AM FM Medium Wave Shortwave Receiver broadcasts Headphone Radio Module antenna Volume Adjustable
$5.90
VisionFive 2 development board VisionFive2 RISC-V AI StarFive JH7110 integrated 3D GPU
$78.90 – $176.90Price range: $78.90 through $176.90
DC8-30V Battery Capacity Indicator Lead-Acid/Lron-Lithium/Ternary Lithium Measurement with USB3.0 and Tpye-C for Car Motorcycle
$7.90
EAR00387 1XL M.2 Wi-Fi6 a/b/g/n/ac/ax MU-MIMO, Bluetooth 5.3
$130.90
For CNC Engraving Machine Makerbase MKS LS ESP32 PRO GRBL Controller Module Support WIFI Bluetooth Touch Screen Upgrade DLC32
$18.90 – $42.90Price range: $18.90 through $42.90

Compare full, fast and partial e-paper updates. Diagnose residual digits, initialization after wake and panel-specific driver requirements.

Identify the CYD board and LCD controller before changing drivers. Follow a repeatable display test and separate LCD faults from touch configuration.

Explore XiaoZhi, ElatoAI, ESPHome, ESP-SR, ESP-WHO, ESP-Detection, Edge Impulse and SenseCraft AI. Compare hardware, local inference and backend requirements before your first build.

Discover ten active ESP32 open-source projects for 2026, from XiaoZhi AI and WLED to ESPHome, Meshtastic and touchscreen control. Includes GitHub popularity, hardware considerations and first-build ideas.

Choose an e-paper display for your ESP32 project: compare screen types, raw panels and modules, refresh modes, memory needs and power considerations.

Compare ESP32-C3, ESP32-C5 and ESP32-C6 for Wi-Fi bands, Bluetooth LE, Thread, Zigbee, memory and Matter product design. Find the right connectivity for your project.