Another CYD issue (ESP32-2432S024C) [Solved]

Hi,

I cannot get my display to work so, I appreciate some guidance.

My Micropython code works which tells me the display is healthy. The pinout used in the code is:

IO Pins
     0   Digital   Boot Button
     1   Digital   Connector P1 & USB Chip          - TX
     2   Digital   Display                          - TFT_RS / TFT_DC
     3   Digital   Connector P1 & USB Chip          - RX
     4   Digital   RGB LED                          - Red
     5   Digital   SD Card                          - TF_CS [VSPI]
     6   Digital   Not Connected
     7   Digital   Not Connected
     8   Digital   Not Connected
     9   Digital   Not Connected
    10   Digital   Not Connected
    11   Digital   Not Connected
    12   Digital   Display                          - TFT_SDO / TFT_MISO [HSPI]
    13   Digital   Display                          - TFT_SDI / TFT_MOSI [HSPI]
    14   Digital   Display                          - TFT_SCK [HSPI]
    15   Digital   Display                          - TFT_CS [HSPI]
    16   Digital   RGB LED                          - Green
    17   Digital   RGB LED                          - Blue
    18   Digital   SD Card                          - SCK [VSPI]
    19   Digital   SD Card                          - MISO [VSPI]
    21   Digital   Touch CST820, Connector P3 & CN1 - CTP_INT / I2C SDA
    22   Digital   Connector P3 & CN1               - I2C SCL
    23   Digital   SD Card                          - MOSI [VSPI]
    25   Digital   Touch CST820                     - CTP_RST
    26   Analog    Speaker                          - !!!Speaker ONLY! Connected to Amp!!!
    27   Digital   Display                          - TFT_BL (BackLight)
    32   Digital   Touch CST820                     - CTP_SCL
    33   Digital   Touch CST820                     - CTP_SDA
    34   Analog    LDR Light Sensor                 - !!!Input ONLY!!!
    35   Digital   P3 Connector                     - !!!Input ONLY w/ NO pull-ups!!!
    36   Digital   Not Connected
    39   Digital   Not Connected

and the equivalent used in "User_setup.h" is:

#define ILI9341_2_DRIVER
#define TFT_WIDTH  240
#define TFT_HEIGHT 320
#define TFT_BL   27            // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH  // Level to turn ON back-light (HIGH or LOW)
#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS   15  // Chip select control pin
#define TFT_DC    2  // Data Command control pin
//#define TFT_RST   4  // Reset pin (could connect to RST pin)
#define TFT_RST  -1  // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

With that I'm not able to get a TFT_eSPI basic example to run. I get no errors and the display does turn on (WHITE) but, beside that, nothing happens.

I'm sure the problem is getting the right pinout in the user setup file.

TIA

Try enabling the following in your User_Setup.h:

// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
// then uncomment the following line:
#define USE_HSPI_PORT

Edit: Mine is 2432S028R and I need the above.

It was enabled so, I commented it to no glory. I'm now playing with frequencies but I'm not getting anywhere. Thank you!

So, I finally got it working!!
These are the settings in the User_Setup.h file:

#define ILI9341_DRIVER       // Generic driver for common displays
#define TFT_WIDTH  240
#define TFT_HEIGHT 320 // ST7789 240 x 320
#define TFT_BL   27            // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH  // Level to turn ON back-light (HIGH or LOW)

#define ESP32_DMA
#define TFT_MISO 12
#define TFT_MOSI 13 // In some display driver board, it might be written as "SDA" and so on.
#define TFT_SCLK 14
#define TFT_CS   15  // Chip select control pin
#define TFT_DC   2  // Data Command control pin
#define TFT_RST  -1  // Reset pin (could connect to Arduino RESET pin)
#define TFT_BL   27  // LED back-light
#define TOUCH_CS 33     // Chip select pin (T_CS) of touch screen

#define LOAD_GLCD   // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2  // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4  // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6  // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7  // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8  // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_GFXFF  // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
#define SMOOTH_FONT

#define SPI_FREQUENCY  80000000
#define SPI_READ_FREQUENCY  80000000
#define SPI_TOUCH_FREQUENCY  2500000  //2500000

Also, the selection under the ESP32 should be:

Flash mode: "DIO"

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.