• sales

    +86-0755-88291180

Missing TFT_eSP User_Setup pin configuration

2025-04-13 19:49:53 Ask

Please provide information about the correct pin configuration in the TFT_eSPI User_Setup.

The following code does not work:

#define GC9A01_DRIVER

#define TFT_MOSI 13 
#define TFT_SCLK 12
#define TFT_CS   10  
#define TFT_DC   9  
#define TFT_RST  14  


#define TFT_WIDTH 160
#define TFT_HEIGHT 160


#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  40000000

#define SPI_READ_FREQUENCY  20000000

What is the correct pin defintion for the SPI?


2answers
SpotPearGuest246b4
Answer time:
2025-04-14 13:52:35

The display driver type is GC9D01. Make sure you are using the correct tutorial program. Here is a partial reference:

TFT_MOSI  7、TFT_SCLK  6、TFT_CS    5、TFT_DC    4 、TFT_RST   8

Like0

report

SpotPearGueste6009
Answer time:
2025-04-15 02:19:52

Thank you - I've managed to get the display work with the following settings:

  • Board library:
    • esp32 v2.0.13 (newer versions does not work)
  • TCT_eSPI library:
    • used from tutorial download (lib)
      • (seems to be a patched version of 2.5.0 with added support for GC9D01 driver)
    • User_Setup: used from the tutorial download

Regards,



Like0

report

Price: $9.9-12.9
Part Number: ESP32-C3-LCD-0.71
Brand: SpotPear