March 29, 2024, 12:24:55 PM

ESP32-POE TFT_eSPI & SD

Started by smithbcu, July 10, 2021, 05:57:06 PM

Previous topic - Next topic

smithbcu

Hello,

I am using the TFT_eSPI library for my TFT/touch/sd combo. On another ESP DEV board, I had touch, tft and sd all on the same built in SPI.  That doesn't seem to work here.  I can get the tft to work, but it fails to begin the sd.  I would prefer to get the TFT SD to work, but so far I have not had any luck getting ether to work.  I have tried the default sd.begin and also setting pins for the TFT SD.  Does anyone have any recommendations on how to get this working?  I am using Arduino IDE to compile and program the board.  Any help is greatly appreciated.

Thank you,
Ben

LubOlimex

Probably some multiplexing issues. What is the other ESP board that you used successfully? Does it have wired Ethernet as ESP32-POE?
Technical support and documentation manager at Olimex

smithbcu

It did not have wired ethernet, It was a ESP-WROOM-32.  I tried the SD_MMC library and was able to get it to work.  The SD.h did not work not matter what. I piggybacked the lcd sd slot of the onboard.  I now have the ethernet and sd working, but only partly the lcd.  The lcd works until I open the file on the sd and then it stops working.  If I shut the ethernet off then the lcd works again.

LubOlimex

#3
From your description it seems like some of the pins that you used for the LCD are also used for the SD, no? When you use the SD pins, the LCD hangs. Make sure to remove that multiplexing.

Where exactly is the LCD connected to? Which pins exactly on the board?
Technical support and documentation manager at Olimex

smithbcu

I was able to get it to work.  If you have other recommendations let me know but otherwise I am set.

#define TFT_MISO 35
#define TFT_MOSI 13
#define TFT_SCLK 4 
#define TFT_CS  16 
#define TFT_DC    3 
#define TFT_RST  -1 

#define TOUCH_CS 5   
#define TOUCH_CLK 4
#define TOUCH_DIN 13
#define TOUCH_DO 35


I am using 32 and 33 for I2C

SD I have:
MOSI as 15
MISO as 2
SCK as 14
CS tied high as that is what it looks like you are doing on the board.

LubOlimex

Thank you for the update, glad you got it working. Looks good. About CS, indeed, idle is high, active is low.
Technical support and documentation manager at Olimex

silentrain

#6
Hi
I am trying to do the same (TFT_espi library with a st7735 lcd which works fine on a ESP32 wroom model).
I am trying to use the pins in the UEXT (after changing GPIOs assignments) connector but no luck. Are there any differences between the signals in the UEXT and the signals in the EXT?

My final project will use:
- 3 photoresistor
- eth for a modbus connection
- Wi-Fi for MQTT sending
- SD card for backup
- ESP32 POE-ISO board
- tft lcd

Am I Ok with the pins?
Thank you

PS: update.
I succeeded in connecting the TFT by using:
#define TFT_MOSI 3       
#define TFT_MISO 5
#define TFT_SCLK 16
#define TFT_CS 5    
#define TFT_DC 13
#define TFT_RST -1

while with these pinout it didnt work
//#define TFT_MOSI 4
//#define TFT_MISO 5
//#define TFT_SCLK 16
//#define TFT_CS 36
//#define TFT_DC 13
//#define TFT_RST -1

but now i got an image not crispy with lots of trails in the image.

LubOlimex

Personally I would avoid using GPIO3 (that you used as TFT_MOSI 3). Try using GPIO33 instead, for example.

You said you used UEXT but the pins you mentioned in the update below are not routed to the UEXT of ESP32-PoE.

What board did you use?

Where did you establish the hardware connections mentioned in the update?
Technical support and documentation manager at Olimex