Hello everyone, I would like to use my 2 Inch 240x320 IPS display, ST7789V driver , with the esp32 wroom 32D. Is this possible? If this Is possibile, how should the individual pins be connected. Do you recommend the TFT_eSPI.h library for this configurations or other libraries? Thank you very much for your patience.
The digital communication pins (MOSI, SCLK, CS, DC, reset, …) can be connected to any GPIO pins since the ESP32 has a GPIO matrix, meaning it can map the e.g. SPI peripheral to arbitrary GPIO pins.
The power pins (VCC, GND, backlight,…) should ofc go to the appropriate pins in accordance to the product description (most likely 3.3V, GND etc).
thank you very much for the response.
While I was waiting, I saw a bit which setup was better with tft_espi library. I was able to print to screen the resolution is 240x240 while the screen is 240x320. I changed the size in the setup but it does not change the result.
I now attach a picture of what appears on the screen.
In the User_Setup_Select.h file, I uncommented this line:
#include <User_Setups/Setup23_TTGO_TM.h>
After that i modify Setup23_TTGO_TM.h :
// Setup for the TTGO TM (Music) ESP32 board with 2.4" ST7789V display
#define USER_SETUP_ID 23
// See SetupX_Template.h for all options available
#define ST7789_DRIVER
#define TFT_SDA_READ // Read from display, it only provides an SDA pin
//#define TFT_MISO 19 // Must be defined even though it is not used
#define TFT_MOSI 23 // Connected to display SDA line
#define TFT_SCLK 18
#define TFT_CS 05
#define TFT_DC 16
#define TFT_RST 17
#define TFT_BL 4
#define TOUCH_CS -1
#define TFT_WIDTH 240
#define TFT_HEIGHT 320
#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
//#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
// Black and white swap option
//#define TFT_INVERSION_ON
#define TFT_INVERSION_OFF
#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 40000000 // This display also seems to work reliably at 80MHz
//#define SPI_FREQUENCY 80000000
#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
If you ask specific questions, the likelihood of getting an answer is quite high. You should create a new topic for your question.
As a beginner, you should first try out some examples. There are many tutorials on the TFT_eSPI library on YouTube (e.g. from VolosProject: https://www.youtube.com/@VolosProjects)