Page 1 of 1

esp32, use HSPI pins for ST7735

Posted: Mon Jan 11, 2021 2:17 pm
by Francis
Hello everyone!

I am trying to connect my ST7735 to my esp32 devkit v1 via HSPI pins.
Unfortunatly, I can't make it work.

My code:

Code: Select all

#include <Adafruit_GFX.h>    
#include <Adafruit_ST7735.h>
#include <SPI.h>

#define TFT_CS         15
#define TFT_DC          2 
#define TFT_RST        4
#define TFT_MOSI     13
#define TFT_SCLK     14
#define TFT_BL          27

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

void setup(void)
{
	tft.initR(INITR_GREENTAB);
	tft.fillScreen(ST7735_BLACK);

	...a lots of drawings from library example code...
}
The screen remains white (it never becomes black nor draws anything).

I have seen here that CS pins may not work: https://www.esp32.com/viewtopic.php?f=1 ... SPI#p45176
I have on default SPI pins (VSPI i guess) a SD card connected. I would prefer not having multiple devices on the same bus, but maybe its the only solution.

Do you have any idea why the screen remains white?

Thank you for your help!

Francis

Re: esp32, use HSPI pins for ST7735

Posted: Tue Jan 12, 2021 2:38 pm
by Francis
I changed ESP32 board and used shorter wires. Then the problem got solved!