Skip to content
Display Engineer
Troubleshooting

ILI9341 vs ST7789: How to Tell Which Controller Your Display Has

Boards sold under the same name ship with ILI9341 or ST7789 controllers. How to identify yours by symptoms or by reading the ID register, and the settings that fix white screens and wrong colours.

DEDisplay Engineer Applications Team · Display application engineersEngineer-reviewed Oct 11, 2026

Why the same board can have a different controller

Low-cost display boards are built from panels bought on the open market. When a batch changes supplier, the controller can change too, while the board name, PCB and pinout stay the same. The ESP32-2432S028R (Cheap Yellow Display) and the ESP32-2432S024 both exist in ILI9341 and ST7789 versions.

Identify it by symptoms

What you see with an ILI9341 setup

Likely cause

Fix

White or blank screen, backlight on

Controller is ST7789

Switch to the ST7789 driver

Image appears, colours look negative

ST7789 panel needs inversion

Toggle inversion (TFT_INVERSION_ON)

Red and blue swapped

Colour order

Set BGR order (TFT_RGB_ORDER TFT_BGR)

Image mirrored or offset

Rotation / memory access setting

Change rotation (MADCTL)

Everything dark

Backlight pin wrong or reused

Check the backlight GPIO

Change one setting at a time and keep a known-good example to compare against.

Identify it by reading the ID

If the board connects the panel's MISO line, you can read the controller ID instead of guessing. An ILI9341 answers 0x9341 to the Read ID4 command (0xD3). In TFT_eSPI, tft.readcommand8(0xD3, n) reads byte n of a register. If you do not get 0x93 and 0x41, try the ST7789 driver. Boards without MISO cannot be read, so use the symptom table.

Settings that differ

Item

ILI9341

ST7789

TFT_eSPI driver

ILI9341_DRIVER / ILI9341_2_DRIVER

ST7789_DRIVER

LovyanGFX

Panel_ILI9341

Panel_ST7789

ESP-IDF

espressif/esp_lcd_ili9341

esp_lcd_new_panel_st7789() (built in)

Inversion

usually off

often on

Templates for both are on the ILI9341 and ST7789V pages.

Avoiding this in a product

For a product, specify a module whose datasheet names the controller and whose supplier fixes it per production lot, so firmware does not break between batches. Our 2.8-inch 240×320 SPI module uses a specified ST7789V; samples start at 1 pc.

Frequently asked questions

Can ILI9341 code run on an ST7789?

Not reliably. Both are 240×320 controllers, but the initialisation sequence differs, so change the driver rather than patching the ILI9341 code.

Why are the colours inverted on my ST7789 display?

Many ST7789 panels need display inversion (INVON). Enable TFT_INVERSION_ON or call tft.invertDisplay(true).

How do I read the controller ID?

With MISO connected, read register 0xD3 (Read ID4): an ILI9341 returns 0x93 0x41. Without MISO, identify it by symptoms.

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.