Xiao esp32 and tft_espi - c3 works well/ s3 doesn't work.. What are the differences (Solved) #2757
Replies: 3 comments 2 replies
-
Use the default SPI pins as noted here: #define TFT_CS 34 // 10 or 34 (FSPI CS0) If you use GPIO 10-13 then add the following line to the setup: SPI GPIO should not be randomly assigned for the S3. If other pins are used then it may be necessary to reduce the SPI clock rate due to the use of an IO multiplexer within the S3. Example pins for another board here: |
Beta Was this translation helpful? Give feedback.
-
Bodmer, Thanks for the info. The Xiao doesn't have GPIO 34-37 or 10-13 available on the board but the info that you provided did get me on the right track. It turns out that my real problem was simply that TFT_CS don't work on D7. One of the examples you referenced (Xiao with the round display) used D1 for TFT_CS. I changed it to D1 and the display lit up like it should (kinda). I made a few other minor changes but the TFT_CS change is the main thing. I'm posting a small sketch below that will work on this board/display combination. The kinda add above is because of a display problem I'm still having but I'll post that in another thread. (not sure why this is in bold??)
|
Beta Was this translation helpful? Give feedback.
-
Hi Bodmer, |
Beta Was this translation helpful? Give feedback.
-
I have a Seeed Xiao esp32c3 and an esp32S3 board that I am using with a Waveshare 2"LCD Module (ST7789). I can get the c3 board to work well with the LCD using the tft_espi drivers but I can not figure out what I'm doing wrong with the s3 board. All I get from the s3 board is a blank screen.
It appears that both the c3 and s3 boards have the same pinout as far as the SPI configuration is concerned so I am simply swapping between the two boards on a breadboard with no wiring or configuration changes. Everything in the IDE is up to date on the latest versions. I do switch between the c3 and s3 in the IDE when I'm changing the boards. I simplified the sketch to as simple as I could to try to make this work (below). The commented section at the end is the relevant part of the user_setup.h from the tft_espi library directory. With this sketch, the LCD will change color to whatever I tell it to be with the fillScreen command for the c3 but when I use the se board, I just get a blank, black screen.
Any help understanding what I'm doing wrong would help.
Thanks
#include <SPI.h>
#include <TFT_eSPI.h> // Hardware-specific library
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
void setup() {
tft.begin();
tft.fillScreen(TFT_BLUE);
}
void loop() {
// do nothing
}
//#define TFT_MISO -1
//#define TFT_MOSI D10
//#define TFT_SCLK D8
//#define TFT_CS D7 // Chip select control pin
//#define TFT_DC D3 // Data Command control pin
//#define TFT_RST D4 // Reset pin (could connect to RST pin)
Beta Was this translation helpful? Give feedback.
All reactions