logo elektroda
logo elektroda
X
logo elektroda

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

darex120 684 26
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21775345
    darex120
    Level 18  
    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  
    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  
    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  
    Will it even work for me under ESP32 DevKit V1?
  • ADVERTISEMENT
  • #5 21786805
    efi222
    Level 21  
    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  
    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  
    Without publishing the programme code, it is difficult to provide an answer.
  • #8 21788998
    darex120
    Level 18  
    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  
    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);
  • #10 21789104
    darex120
    Level 18  
    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  
    darex120 wrote:
    shows only rectangles

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

    I do not see the screen resolution settings here.
  • ADVERTISEMENT
  • #14 21789158
    darex120
    Level 18  
    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  
    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  
    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  
    It can be seen that the U2 integrated circuit is missing.
  • #18 21789996
    darex120
    Level 18  
    So as I thought, there isn't one, and such a circuit if I add one, the touch will work?
  • #19 21790002
    inot
    Level 38  
    It is not known what kind of integrated circuit it is. It would be necessary to compare with similar displays.
  • ADVERTISEMENT
  • #21 21790026
    inot
    Level 38  
    And does the screen have a touch film on the front?
  • #22 21790159
    darex120
    Level 18  
    Good question but I think soLCD display module with gray signal wires soldered to pin header
  • #24 21790561
    darex120
    Level 18  
    And what should be the resistance on these pins
  • #25 21790581
    inot
    Level 38  
    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  
    >>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  
    Well, all explained. Hence the absence of this IC on the board.
ADVERTISEMENT