Hello everyone,
I am in the process of connecting a 2.8 inch TFT display (ILI9341) to an ESP32 S3. Unfortunately I have not yet managed to get any test codes to run. I am not sure which pins to use. Can you help me or do you have a test code for an ESP32 S3 with the pin connections for this display? Thank you very much!
srnet
May 5, 2024, 11:24am
2
You can use most any pins.
The TFT display DC,RST and CS are allocated in the normal way.
There are defaults for the SPI pins, but if your not sure just define them like this;
#define MOSI 11
#define SCK 12
#define MISO 13
And then start SPI with;
SPI.begin(SCK, MISO, MOSI);
if you run the following on a ESP32-S3-DevKit-1
void setup() {
Serial.begin(115200);
delay(2000);
Serial.print("SDA ");
Serial.println(SDA);
Serial.print("SCL ");
Serial.println(SCL);
Serial.print("MOSI: ");
Serial.println(MOSI);
Serial.print("MISO: ");
Serial.println(MISO);
Serial.print("SCK: ");
Serial.println(SCK);
Serial.print("SS: ");
Serial.println(SS);
}
void loop() {}
you get
SDA 8
SCL 9
MOSI: 11
MISO: 13
SCK: 12
SS: 10
which corresponds with the SPI setting of post 2 by @srnet
to test I connected a RA-02 433MHz LoRa module to a ESP32_S3_DevKit_1 SPI using the following
// ESP32_S3_DevKit_1 connections
// ESP32_S3 SCK pin GPIO12 to RA-02_pin SCK
// ESP32_S3 MISO pin GPIO13 to RA-02_pin MISO
// ESP32_S3 MOSI pin GPIO11 to RA-02_pin MOSI
// ESP32_S3 SS pin GPIO 10 to RA-02 SS
// ESP32_S3 pin GPIO16 to RA-02 Reset
// ESP32_S3 pin GPIO17 to RA-02 DIO0
and it worked transmitting data peer-to-peer to a Raspberry Pi pico RP2040 with a RA-02 LoRa module
Hello @derahnungslose
as @srnet mensioned, you can use most of the pins for that connection.
I am using 1.8 TFT but ST7735 with the following pins:
#define TFT_CS 16
#define TFT_RST 6
#define TFT_DC 15
#define TFT_MOSI 17
#define TFT_CLK 18
And then:
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST);
And it works.
You are using ILI9341, that should not be problem since only the driver must be changed.
Alternativly you can use SPI2 with the following pins:
#define SCK 12
#define SS 10
#define MOSI 11
#define MISO 13
I am using the same MCU: ESP32S3 Devkit 1.
Or you can do as @horace mensioned and figure out which pins are for SPI (default).
I hope that helps you.
testing a BuyDisplay ER-TFTM043-3 TFT LCD display using the Adafruit_RA8875 library
File>Examples>Adafruit_RA8875>buildtest compiles and runs OK using ESP32_S3_DevKit_1 SPI pin configuration
// ESP32_S3_DevKit_1 connections
// ESP32_S3 SCK pin GPIO12 to display JP1/8 SCLK
// ESP32_S3 MISO pin GPIO13 to display JP1/6 SDO
// ESP32_S3 MOSI pin GPIO11 to display JP1/7 SDI
// ESP32_S3 SS pin GPIO10 to display JP1/5 /SCS
trying a ILI9341 color TFT display on a ESP32-S3-DevKitC-1 the following worked OK using the Adafruit_ILI9341 library
#define TFT_CS 10 // no connection on ILI9341
#define TFT_DC 9
#define TFT_MOSI 11
#define TFT_CLK 12
#define TFT_RST 3
#define TFT_MISO 13
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
system
Closed
November 5, 2024, 3:50pm
7
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.