Skip to content
Display Engineer
Guide

1.28-inch Round Display with ESP32 (GC9A01): Wiring, Libraries and Round-UI Tips

A step-by-step build: wire a 240×240 GC9A01 round TFT to an ESP32-S3, configure TFT_eSPI, LovyanGFX or ESP-IDF, size LVGL buffers, and lay out a UI that fits the circle.

DEDisplay Engineer Applications Team · Display application engineersUpdated Oct 23, 2026
1.28-inch GC9A01 round display geometry with 170 px text zone and ESP32-S3 SPI wiring

What you need

  • A 1.28″ 240×240 round TFT module with a GC9A01 controller and an SPI connector.
  • An ESP32-S3 board (any ESP32 works; pin numbers below are for the ESP32-S3).
  • Arduino with TFT_eSPI or LovyanGFX, or ESP-IDF with the esp_lcd_gc9a01 component.
  • Optional: LVGL for the user interface.

Step 1: Wire the panel

Panel pin

Purpose

ESP32-S3 GPIO (example)

SCLK

SPI clock

12

MOSI (SDA)

SPI data to the panel

11

CS

Chip select

10

DC

Data / command select

any free GPIO

RST

Reset (or tie to the MCU reset)

any free GPIO

BL

Backlight (PWM for dimming)

any PWM-capable GPIO

GPIO 12, 11 and 10 are the IO_MUX pins of the SPI2 host. Through the GPIO matrix any pins work up to 40 MHz; above that, use these pins and keep the wires short. MISO is usually not used. For a known-good reference, see the Waveshare ESP32-S3-Touch-LCD-1.28 board page.

Step 2: Configure the library

Library

Setting

TFT_eSPI (Arduino)

#define GC9A01_DRIVER, 240×240

LovyanGFX

lgfx::Panel_GC9A01

ESP-IDF

espressif/esp_lcd_gc9a01 component

LVGL

any of the above as flush driver, with partial draw buffers

Start at 40 MHz. The GC9A01 page has config templates you can download.

Step 3: Run a first test

Fill the screen with red, green and blue in turn, then draw a circle of radius 119 centred at (120, 120). If the colours are swapped, change the RGB/BGR order. If the circle is clipped or off-centre, check rotation and the panel size in your configuration. A white or black screen means the panel is not initialised; see the white-screen checklist.

Step 4: Size the LVGL buffers

A full frame in RGB565 is 240 × 240 × 16 bit = 921,600 bits (112.5 KB). It fits in internal RAM, but LVGL works well with two partial buffers of 1/10 screen each (about 11 KB), which leaves RAM for the application and lets one buffer render while the other is sent.

Step 5: Know the speed limits

The theoretical full-frame rate is about 43 fps at 40 MHz and 86 fps at 80 MHz. Real UIs are slower because of command overhead and rendering time, so LVGL redraws only the changed areas. Gauges and watch faces that update a needle or a few digits look smooth even at 40 MHz.

ESPHome: mipi_spi and LVGL

ESPHome drives this panel with the mipi_spi display platform. The model name is GC9A01A, with the A; the mipi_spi list has no plain GC9A01. The model sets 240×240 for you, and its chip definition in the ESPHome source sets mirror_x by default, so mirrored text means a scan-direction setting, not a wiring fault.

A minimal display block needs:

  • platform: mipi_spi and model: GC9A01A
  • dc_pin (required), plus cs_pin and reset_pin if they are wired to GPIOs
  • invert_colors: true if colours look like a negative. ESPHome's preset for the Sunton ESP32-2424S012 round board sets it.
  • data_rate: the default is 10 MHz, so set the clock you have tested

With LVGL on top, ESPHome's LVGL documentation asks for auto_clear_enabled: false and update_interval: never on the display, because LVGL does the drawing.

LVGL allocates its own draw buffer. buffer_size defaults to 100% of the screen and falls back to 12% if that allocation fails; on boards without PSRAM the documentation recommends 25%. At 240×240 in RGB565, 25% is 28,800 bytes.

If you use the Sunton ESP32-2424S012 (1.28″ round, GC9A01A), model: ESP32-2424S012 sets the pins and inversion for you.

TFT_eSPI: Setup46 or Setup200?

Many classic-ESP32 wiring guides use SCLK 18, MOSI 23, CS 15, DC 2 and RST 4. Those are the pins in TFT_eSPI's Setup46_GC9A01_ESP32.h. Setup200_GC9A01.h looks like the generic GC9A01 file but uses different pins:

Signal

Setup46_GC9A01_ESP32

Setup200_GC9A01

MOSI

23

15

SCLK

18

14

CS

15

5

DC

2

27

RST

4

33

Backlight

not set

22

With the 18/23 wiring and Setup200 selected, the library clocks data out on pins that go nowhere. Nothing reports an error and the panel just stays blank. Whichever setup file you select, check that its TFT_* pin defines match your wiring.

Designing for a circle

  • Keep text inside the inscribed square. The largest square that fits in a 240-pixel circle is 240 ÷ √2, about 170×170 pixels; put labels and numbers there.
  • Use arcs and rings for data. Gauges, progress rings and radial menus use the edge that rectangles waste.
  • Filter touches outside the circle. Round boards often pair the panel with a CST816S touch controller that reports x/y in the 240×240 square. Accept a touch only if (x − 120)² + (y − 120)² ≤ 120².
  • Check the visible area against your bezel. The active area of the panel, not the glass, sets what the user sees.

Round displays in our catalog

Our direct factories build round modules including a 1.28-inch 240×240 IPS SPI module, a 1.3-inch 360×360 version with capacitive touch, and a 2.1-inch 480×480 version. See all round LCD displays; confirm the controller on the datasheet, as it can differ from the GC9A01 in other sizes. Samples start at 1 pc.

Frequently asked questions

What resolution is a 1.28-inch round display?

Usually 240×240 pixels with a GC9A01 controller; the visible area is the circle inscribed in that square.

Can an ESP32 drive a GC9A01 at 60 fps?

Full-screen redraws are limited to about 43 fps at 40 MHz SPI in theory. Partial updates, which LVGL uses, make smooth animation possible for typical gauge and watch UIs.

Which pins does a GC9A01 display need?

SCLK, MOSI, CS, DC, reset and backlight. MISO is normally not connected.

Why is my round display image off-centre?

The rotation or panel size in the library does not match the module. Set 240×240 and try the other rotations until a circle of radius 119 at (120, 120) sits centred.

Sources

  1. Espressif esp_lcd_gc9a01 component
  2. ESP-IDF: SPI master driver, IO_MUX pins
  3. TFT_eSPI library
  4. LovyanGFX library
  5. LVGL documentation
  6. ESPHome: MIPI SPI display driver (GC9A01A model)
  7. ESPHome: LVGL (buffer_size, display settings)
  8. ESPHome 2026.10.0 source: mipi_spi/models/ili.py and cyd.py
  9. TFT_eSPI: Setup200_GC9A01.h
  10. TFT_eSPI: Setup46_GC9A01_ESP32.h
  11. Display Engineer examples: ROUND-GC9A01A-LVGL.md

Modules mentioned in this guide

Not sure which display fits your design?

Send us your size, interface and host processor. A display engineer replies within 12 hours with 2–3 options, datasheets and init code. Samples from 1 pc.