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 ( |
Red and blue swapped | Colour order | Set BGR order ( |
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 | | |
LovyanGFX | | |
ESP-IDF | | |
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.

