Adafruit-ST7735-Library
Adafruit-ST7735-Library copied to clipboard
not spout esp32c3 HW SPI?
Arduino board: ESP-C3-13-Kit
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.19
List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too): test graphicstest.ino
#define TFT_CS 1 #define TFT_RST -1 #define TFT_DC 0 #define TFT_MOSI 2 // Data out #define TFT_SCLK 6 // Clock out Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST); it will work,but slow.
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); use this code nothing happend. GPIO2 is HW spi MOSI GPIO6 is HW spi SCK
Discovered using a logic analyzer,GPIO4 use by HW_SPI_SCK,GPIO6 use by HW_SPI_MOSI. It's not match datasheet default pin func,
After line 582 of the Adafruit_SPITFT.cpp file: if (!freq) freq = DEFAULT_SPI_FREQ; // If no freq specified, use default Add the following code: freq = 10000000;
After line 639: hwspi._spi->begin(); Add the following code: pinMode(3, OUTPUT);//spi clk pinMode(4, OUTPUT);//spi mosi gpio_matrix_out(3, 63, false, false);//spi clk gpio_matrix_out(4, 65, false, false);//spi mosi gpio_matrix_out(5, 0x100, false, false); gpio_matrix_out(6, 0x100, false, false); pinMode(5, OUTPUT); pinMode(6, OUTPUT);
The LCD works perfectly on the hardware spi.
can you try again with the 2.0.3 ESP for arduino ide release?