Hallo everybody
Today I am just testing some TFT Displays on different ESP32 boards and get some issues which I can't solve and need some help:
I usually make some test PCB's for general testing new HW or new sketches. on the foto you see an ESP32 WROOM 38pin Dev Board, an XIAO Esp32 C3 Mini board and a ESP32 C3 Supermini board which I allready used many times.
Now I did some tests to get a ST7735 TFT Display and a ILI9341 TFT Display working on these Dev boards. I was using the example sketches from the AdafruitI LI9341, the AdafruitST7735 and the TFT_eSPI libraries. Of course I adapted each example to my different SPI configurations, with Adafruit inside the sketch and with the TFT_eSPI in the User_Setup.h file. Look at my little table to see my results:
As you can see, every display works good on the WROOM Dev Board with any library but not on the other Mini Dev Boards. The othe issue is that the Adafruit libraries work for any display on every Dev Board but very slow. Seems like at least the ILI-Display does not get run with the hardware SPI allthough I am using the designated pins.
The used sketches are examples from the libraries just adapted to the SPI pins.
for the XIAO Board looks like this:
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default.
#define TFT_DC 5
#define TFT_CS 20
#define TFT_MOSI 10
#define TFT_CLK 8
#define TFT_RST 3
#define TFT_MISO -1
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC); // DOES NOT WORK ON NO ESP32 BOARD
// If using the breakout, change pins as desired
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
void setup() {
Serial.begin(9600);
Serial.println("ILI9341 Test!");
tft.begin();
the User_Setup.h file:
// USER DEFINED SETTINGS
// User defined information reported by "Read_User_Setup" test & diagnostics example
#define USER_SETUP_INFO "User_Setup"
#define ILI9341_DRIVER // Generic driver for common displays
// #define ILI9341_2_DRIVER // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172
// For ESP32 Dev board (only tested with ILI9341 display)
// The hardware SPI can be mapped to any pins
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 5 // Chip select control pin
#define TFT_DC 0 // Data Command control pin
#define TFT_RST 2 // 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
// For ESP32 C3 Supermini
// The hardware SPI can be mapped to any pins
//#define TFT_MOSI 6
//#define TFT_SCLK 4
//#define TFT_CS 7
//#define TFT_DC 3
//#define TFT_RST 2
// For ESP32 XIAO C3 Supermini
// The hardware SPI can be mapped to any pins
// #define TFT_MOSI 10
// #define TFT_SCLK 8
// #define TFT_CS 20
// #define TFT_DC 5
// #define TFT_RST 3
#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_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
// this will save ~20kbytes of FLASH
#define SMOOTH_FONT
#define SPI_FREQUENCY 27000000
#define SPI_READ_FREQUENCY 20000000
#define SPI_TOUCH_FREQUENCY 2500000
#define USE_HSPI_PORT
any ideas what is happening ???
thanks so far