Alternative to Bodmer's TFT_eSPI?

Hello,

Newbie question here.

Turns out Bodmer's TFT_eSPI library won't run on Lilygo's T8 board.

To write text°, is there another library I could use?

Thank you.

° Such as

tft.setRotation(1);
tft.fillScreen(TFT_BLACK);
tft.setTextDatum(MC_DATUM)
tft.setTextSize(2);
tft.setTextColor(TFT_BLUE,TFT_BLACK);
tft.drawString("blah", tft.width() / 2, 40);
tft.fillRect(0,0, tft.width(), 60, TFT_BLACK);

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

Apparently it can work but requires a minor config tweak:
^Lilygo t8 display · Issue #1491 · Bodmer/TFT_eSPI · GitHub

I think your statement is wrong. The cause seems to be the missing DC pin on the display board.

Please provide a link to your display, so we can check.

This may be the solution. Without the link I was not aware that the display is on the TTGO board.

It is a pain using 3-Wire SPI on most MCUs. i.e. DC is the 9th bit.

However ESP32 is easy to configure for 9-bit SPI.
I don't think that I have ever used TFT_eSPI with a 3-Wire SPI interface, but I am sure that it will work fine.

It is a mystery why Chinese companies are always trying to reduce pin-count.
e.g. hard-wiring CS low.
e.g. 3-Wire instead of 4-Wire omitting DC.
e.g. bidirectional SDA pin omits MISO
e.g. omitting RESET. most controllers can perform a SOFTWARE_RESET

The last 2 "tricks" are pretty easy to handle with AVR, SAMD, STM32
The first 2 are horrible.

David.

I found a link to the schematics: LilyGo-T-Display-S2/ESP32_S2-Display.pdf at master · Xinyuan-LilyGO/LilyGo-T-Display-S2 · GitHub

You need to download it to get it readable, then you see that RS is connected to MISO.
If this is really true, then you know the DC pin; RS is a synonym. But I can hardly believe, with all their typos. I like the Charing Cable.

Added: fortunately, they use a different SPI for the SD card.

I posted the link to the board I'm using. Here it is again.

The display is still dark, no matter what I try in User_Setup.h:

//#define ILI9341_DRIVER
#define ST7789_DRIVER

#define TFT_WIDTH   240
#define TFT_HEIGHT 320

//Per https://raw.githubusercontent.com/Bodmer/TFT_eSPI/master/User_Setups/Setup70_ESP32_S2_ILI9341.h
#define TFT_MISO 37
#define TFT_MOSI 35
#define TFT_SCLK 36
#define TFT_CS 34
#define TFT_DC 14
#define TFT_RST 15 //Also tried 37 to match MISO

#define USE_HSPI_PORT
  1. Edited User_Setup_Select.h:
//#include <User_Setup.h>                     // Default setup is root library folder
#include <User_Setups/Setup71_ESP32_S2_ST7789.h>             // Setup file for ESP32 S2 with ST7789
  1. Edited Setup71_ESP32_S2_ST7789.h per pins shown in product page:
// Setup for the ESP32 S2 with ST7789 display
// Note SPI DMA with ESP32 S2 is not currently supported
#define USER_SETUP_ID 71
#define ST7789_DRIVER         // Configure all registers

#define TFT_CS     34 //         10 or 34
#define TFT_MOSI 35 //         11 or 35
#define TFT_SCLK 36 //         12 or 36
#define TFT_MISO 37 //         13 or 37
#define TFT_DC     37 //Same as MISO?
#define TFT_RST   38

// FSPI port will be used unless the following is defined
#define USE_HSPI_PORT

#define LOAD_GLCD
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF

#define SMOOTH_FONT

#define SPI_FREQUENCY     27000000

#define SPI_TOUCH_FREQUENCY   2500000
  1. Ran TFT_Print.Test.ino
    RESULT: Doesn't reboot, pushing RST button does nothing, display remains dark.

  2. Edited Setup71_ESP32_S2_ST7789.h:

// FSPI port will be used unless the following is defined
//#define USE_HSPI_PORT

RESULT: Doesn't reboot, pushing RST button does nothing, display remains dark.

FWIW, it runs CircuitPython successfully.

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