logo elektroda
logo elektroda
X
logo elektroda

ESP32 DevKit v1 + LCD ILI9486 white screen - no image, SPI pin configuration

darex120 1404 26
Best answers

Why does my ILI9486 display stay white on an ESP32 DevKit v1 with this SPI pin setup, and what should I change in the TFT_eSPI configuration?

The white screen is most likely a TFT_eSPI configuration/pin-mapping problem on the ESP32, not a bad display, especially since the screen already works on Arduino Uno [#21785126] For TFT_eSPI, make sure User_Setup.h includes the full panel settings, not just the driver: `#define ILI9486_DRIVER`, `#define TFT_RGB_ORDER TFT_BGR`, `#define TFT_WIDTH 240`, `#define TFT_HEIGHT 320`, and `#define TFT_INVERSION_OFF` [#21786805] Also use the verified ESP32 GPIO assignments for this library: `TFT_MISO 19`, `TFT_MOSI 21` (or 23), `TFT_SCLK 18`, `TFT_CS 5`, `TFT_DC 22`, `TFT_RST 17`—these are GPIO numbers, not Arduino pin names [#21786805] If you change the TFT driver in the user setup, delete the Arduino precompiled files in the temp directory and rebuild so the new configuration is actually used [#21789086]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21775345
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Hello
    I have an ESP32 DevKit v1 and an LCD display with ILI9486 when connected this way:

    #define ILI9486_DRIVER

    #define TFT_MISO 19
    #define TFT_MOSI 23
    #define TFT_SCLK 18

    #define TFT_CS 15
    #define TFT_DC 2
    #define TFT_RST 4
    #define TFT_BL 21 // or 3.3V

    #define SPI_FREQUENCY 27000000

    Unfortunately a white screen all the time , what could be the reason for this are you able to help.
    Many thanks in advance

    Added after 8 [hours] 39 [minutes]:

    I have this display3.5 TFT Touch Shield module with XPT2046 controller connected to ESP32 Devkit v1
  • ADVERTISEMENT
  • #2 21775591
    gps79
    Level 37  
    Posts: 2178
    Help: 494
    Rate: 779
    It is not known whether the problem is on the hardware or software side. It is also not known if the display works, so I would suggest running some simple demo program under "best" conditions, i.e. with 5 V power and I/O and on a popular platform; e.g. Arduino Uno.
    https://www.waveshare.com/wiki/3.5inch_TFT_Touch_Shield
    Once you know that the display is working (the backlighting of the screen is not proof of this), then you can swap the microcontroller, library, etc.

    I would also add that for any analysis the information presented so far is not enough. You don't know what the wiring diagram is, how everything is powered, what the program looks like and what it is compiled with.
  • #3 21785126
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Hello, I have used the Arduino and there everything displays correctly, the ESP32 module itself works and WiFi and Bluetooth, the ESP32 connection to the LCD as above.
  • #4 21786003
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Will it even work for me under ESP32 DevKit V1?
  • #5 21786805
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    The settings appear to be those of the library "TFT_espi ".
    If this is the case, there are several entries missing in User_setup.h
    resolution is given as an example.

    #define USER_SETUP_INFO "User_Setup"
    #define TFT_RGB_ORDER TFT_BGR
    #define TFT_WIDTH 240
    #define TFT_HEIGHT 320
    #define TFT_INVERSION_OFF

    For the ESP32 the verified pins for this library. Pins are of course GPIO and not mapped arduino designations.

    #define TFT_MISO 19
    #define TFT_MOSI 21 //(23)
    #define TFT_SCLK 18
    #define TFT_CS 5
    #define TFT_DC 22
    #define TFT_RST 17
    //#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
  • #6 21788782
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Hello again, ILI9486 I have embraced, thanks a lot. Now I have another problem, I bought an ILI9488 and here the following problem occurred: the LCD works but only shows rectangles and colours, it doesn't want to show text. Do you have any ideas why? I have searched the web but cannot find anything on this topic. Thanks in advance for your help.
  • #7 21788840
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    Without publishing the programme code, it is difficult to provide an answer.
  • ADVERTISEMENT
  • #8 21788998
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Hello I have the simplest code

    
    #include <Arduino.h>
    #include <TFT_eSPI.h>
    
    TFT_eSPI tft = TFT_eSPI();
    
    void setup() {
      Serial.begin(115200);
      delay(2000);
      Serial.println("ESP32 DEVKIT V1 START");
    
      tft.init();
      tft.setRotation(1);
      tft.fillScreen(TFT_BLACK);
    
      tft.setTextColor(TFT_WHITE, TFT_BLACK);
      tft.setTextSize(3);
      tft.setCursor(20, 20);
    
      tft.println("ESP32 DEVKIT V1");
      tft.println("ILI9488");
      tft.println("PlatformIO OK");
    }
    
    void loop() {
    
  • #9 21789086
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    Tft_espi is a specific library. If you change the TFT driver in the user_setup file. You should delete the arduino pre-compile files in the system "temp" directory before compiling the new sketch.

    If the display is working properly, instead of
    tft.println();
    try with:
    tft.drawString("Hello, World!", 20, 20);
  • ADVERTISEMENT
  • #10 21789104
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    In the user configuration I have :
    // Configuration for ESP32 DevKit V1 + ILI9488

    #define ILI9488_DRIVER // exactly this driver
    #define TFT_RGB_ORDER TFT_BGR // if your screen has reverse colours, change to TFT_BGR

    // SPI pins
    #define TFT_MOSI 23
    #define TFT_MISO 19
    #define TFT_SCLK 18

    // Control pins
    #define TFT_CS 15
    #define TFT_DC 2
    #define TFT_RST 4 // if RESET pin missing -> set -1

    #define TFT_BL 5 // if backlight controlled by pin, if not connected → skip
    #define TFT_BACKLIGHT_ON HIGH

    #define SPI_FREQUENCY 40000000
  • #11 21789107
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    darex120 wrote:
    shows only rectangles

    In the attached code >>21788998 I do not see the function to display rectangles.
  • #12 21789114
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Could you give me some code to try to upload it and see what happens?
  • #13 21789155
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    darex120 wrote:
    In the user configuration I have

    I do not see the screen resolution settings here.
  • #14 21789158
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    ok, I gave it a go, there was something wrong in the user, I downloaded a new library and now it compiles. And can you tell me why the Arduino IDE compiles the program very slowly?
  • #15 21789193
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    darex120 wrote:
    why does the arduino ide compile the program very slowly

    Only the first time after adding a new library, because the compiler has to integrate it too.
  • #16 21789987
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    I have a question if this display has touch because I plug it in and something doesn't workBack of 3.5-inch TFT display with labeled pins and microSD card slot visible
  • #17 21789995
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    It can be seen that the U2 integrated circuit is missing.
  • #18 21789996
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    So as I thought, there isn't one, and such a circuit if I add one, the touch will work?
  • ADVERTISEMENT
  • #19 21790002
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    It is not known what kind of integrated circuit it is. It would be necessary to compare with similar displays.
  • #20 21790021
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Xpt2046
  • #21 21790026
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    And does the screen have a touch film on the front?
  • #22 21790159
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    Good question but I think soLCD display module with gray signal wires soldered to pin header
  • #23 21790267
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    If this missing IC acts as a touch, these 4 tracks should be connected to the foil.
    Attachments:
    • ESP32 DevKit v1 + LCD ILI9486 white screen - no image, SPI pin configuration Screenshot 2025-12-26 114317.png (316.31 KB) You must be logged in to download this attachment.
  • #24 21790561
    darex120
    Level 18  
    Posts: 1099
    Help: 1
    Rate: 61
    And what should be the resistance on these pins
  • #25 21790581
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    It's hard to tell, but by touching the screen at different points, it should change between the X and Y signals.
  • #26 21791685
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    >>21790159
    This display does not have a touch panel.
    With "touch" it looks like the one below.
    Close-up of an LCD screen with attached touch panel and soldered wires
    This is a fairly rigid 'pane' glued edge-to-edge to the screen
    Display module with a separate touch panel placed loosely on top
  • #27 21791760
    inot
    Level 38  
    Posts: 3505
    Help: 434
    Rate: 785
    Well, all explained. Hence the absence of this IC on the board.

FAQ

TL;DR: On ESP32 DevKit v1 with TFT_eSPI, use GPIO 18/19/23 for SPI and define display options; as one expert noted, "Pins are of course GPIO." Add missing User_Setup defines to avoid the classic white screen. [Elektroda, efi222, post #21786805]

Why it matters: This FAQ helps makers quickly fix ESP32 + ILI9486/ILI9488 "white screen" or "rectangles only" issues with minimal rewiring and config.

Quick Facts

How do I wire an ILI9486/ILI9488 to an ESP32 DevKit v1 using TFT_eSPI?

Use GPIO numbers: SCLK=18, MISO=19, MOSI=21 (or 23), CS=5, DC=22, RST=17. Keep grounds common. These pins are verified for TFT_eSPI on ESP32. If your board routes differently, adjust in User_Setup. Quote: "Pins are of course GPIO." [Elektroda, efi222, post #21786805]

Why do I only get a white screen on the ESP32 with ILI9486?

Missing or wrong User_Setup defines cause a blank white screen. Add TFT_RGB_ORDER, TFT_WIDTH, TFT_HEIGHT, and TFT_INVERSION_OFF. Confirm CS/DC/RST GPIOs match wiring. Then recompile. Most white screens trace to setup or pin mismatches, not a dead panel. [Elektroda, efi222, post #21786805]

How can I prove the LCD works before debugging ESP32 firmware?

Test the shield on a known-good 5V platform like Arduino Uno using a simple demo. Backlight alone does not prove the controller initializes. Quote: "the backlighting of the screen is not proof." This isolates hardware faults from ESP32 or library issues. [Elektroda, gps79, post #21775591]

Will it work at 27 MHz SPI, or should I slow down?

A 27,000,000 Hz SPI clock is a practical starting point shown in the thread. If you see artifacts or timeouts, drop the frequency. Lowering to a mid‑teens MHz value often stabilizes marginal wiring. Keep wires short and powered correctly. [Elektroda, darex120, post #21775345]

ILI9488 shows rectangles and wrong colors—no text. How do I fix it?

Set TFT_RGB_ORDER (e.g., TFT_BGR), define TFT_WIDTH/TFT_HEIGHT, and ensure the correct driver macro is selected. Recheck CS/DC/RST pins. After init, draw text with a basic sketch to confirm. Color/geometry errors usually mean missing setup lines. [Elektroda, efi222, post #21786805]

What must be in TFT_eSPI’s User_Setup.h for these panels?

Include USER_SETUP_INFO, TFT_RGB_ORDER, TFT_WIDTH, TFT_HEIGHT, and TFT_INVERSION_OFF. Map SPI and control GPIOs: MISO, MOSI, SCLK, CS, DC, RST. If RST is tied to board reset, set TFT_RST to -1. Then rebuild. [Elektroda, efi222, post #21786805]

Do I use Arduino pin names or raw GPIO numbers on ESP32?

Use raw GPIO numbers, not Arduino digital pin aliases. Update TFT_eSPI defines to match ESP32 GPIO labeling. Quote: "Pins are of course GPIO." This prevents silent miswires that yield a white screen. [Elektroda, efi222, post #21786805]

What quick sketch can I use to verify text rendering?

Initialize TFT_eSPI, set rotation, clear the screen, set text color/size, and print three lines. The thread’s minimal sketch prints “ESP32 DEVKIT V1”, “ILI9488”, and “PlatformIO OK”. If text fails, revisit User_Setup and pins. [Elektroda, darex120, post #21788998]

My display works on Arduino but not on ESP32—does it still help to test?

Yes. Confirming it runs on Arduino proves the panel is alive. Then focus on ESP32-specific wiring and TFT_eSPI configuration differences. Once validated, you can swap microcontroller and library with confidence. [Elektroda, gps79, post #21775591]

Will this setup work at all on ESP32 DevKit v1?

Yes. Users reported successful ESP32 operation after correcting pin maps and adding the missing TFT_eSPI defines. If you still see a white screen, recheck CS/DC/RST and RGB order. [Elektroda, efi222, post #21786805]

What is TFT_eSPI?

It is the Arduino graphics library whose settings your configuration matches. It needs proper User_Setup defines and ESP32 GPIO mapping to drive ILI9486/ILI9488 reliably. [Elektroda, efi222, post #21786805]

What’s a fast 3‑step bring‑up for ESP32 + ILI9486/ILI9488?

  1. Wire GPIOs: SCLK=18, MISO=19, MOSI=21(23), CS=5, DC=22, RST=17.
  2. In User_Setup.h, add TFT_RGB_ORDER, TFT_WIDTH, TFT_HEIGHT, TFT_INVERSION_OFF, and map pins.
  3. Build the minimal text sketch and check for correct colors and text. [Elektroda, efi222, post #21786805]

Why does backlight turn on but nothing draws?

The LED backlight is independent of controller init. A lit panel can still fail to accept commands if SPI pins, CS/DC, or setup defines are wrong. Treat backlight as power only, not function. [Elektroda, gps79, post #21775591]

I only see shapes, not characters—could font or rotation be wrong?

Text can disappear if rotation mismatches width/height or color order. Set rotation, then define TFT_WIDTH/TFT_HEIGHT correctly and use setTextColor with a contrasting background. Rebuild after changes. [Elektroda, efi222, post #21786805]

Any edge cases I should watch for during troubleshooting?

If RESET ties to board RST, set TFT_RST to -1 in User_Setup to avoid conflicts. Otherwise, the screen may appear dead after firmware uploads. Quote: “// Set TFT_RST to -1 if...”. [Elektroda, efi222, post #21786805]

What did the original poster finally confirm about ILI9486 vs ILI9488?

They got ILI9486 working after adjustments, then saw rectangles on ILI9488 with the simple TFT_eSPI sketch. That points to setup/code differences between the two drivers. Share code for review next. [Elektroda, darex120, post #21788782]
Generated by the language model.
ADVERTISEMENT