-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 C3 - Can't drive ST7789 Washare 1.3inch LCD Display #1787
Comments
change RST pin and not use gpio 2 GPIO2, GPIO8, and GPIO9 are strapping pins of the ESP32-C3 chip. These pins are used to control several chip functions depending on binary voltage values applied to the pins during chip power-up or system reset. For description and application of the strapping pins, please refer to Section Strapping Pins in ESP32-C3 Datasheet. |
That was a dumb mistake on my part, although after instead using GPIO 1 for the RST pin the screen still doesn't show any text (backlight is still on though). Not quire sure if its a software or hardware issue at this point |
I started adding code for the C3 but it is not working and so that processor can be considered as unsupported at the moment. See discussion here. I do not have a C3 anyway to test, but recently adapted and tested a branch here for the S3 and I suspect the C3 will need similar code changes. The Arduino ESP32 board package appears to have a new software development team and so breaking changes are being made which means libraries need adaption for each processor variant! As an example no DS18B20 library seems to work with the S3 because low level calls have changed. Looking at the number of outstanding issues on the ESP32 board package indicates it will be some time before things settle down on these ESP32 variants! |
I patched the branch here so that it might now work with the ESP32 C3. Note I do not have an ESP32 C3 to test it with but it compiled OK under v 2.0.3 RC1 of the ESP32 Arduino board package! |
I downloaded the branch and replaced all files in my libraries folder with the extracted output (excluding the |
This one can be used: |
The rp2040_test.mp4 |
Great, you have it working. The C3 is not supported at the moment. The oddity with that example is to be expected as no graphics clipping is used at the edge of the screen. It is working fine. That example is for larger displays of 240 x 320 minimum. |
ESP32 C3 is now supported in v2.4.61 |
Was this tested on a physical board and if so would you be able to let me know what board, pins and sketch you used? |
Yes, M5 Stamp C3. |
Trying to run the #define ST7789_DRIVER
#define TFT_WIDTH 240
#define TFT_HEIGHT 240
#define TFT_SCLK 4 // CLK on display module
#define TFT_MOSI 6 // DIN on display module
#define TFT_CS 7 // CS on display module
#define TFT_DC 5 // DC on display module
#define TFT_BL 19 // BL on display module
#define TFT_RST 18 // RST on display module
#define TFT_BACKLIGHT_ON HIGH
#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 27000000
#define SPI_TOUCH_FREQUENCY 2500000 |
I tested with ESP32 board package 2.0.3 RC1. |
Updated the ESP32 package to 2.0.3-RC1 but getting the same black screen (backlight is on) #include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
void setup() {
tft.init();
tft.setRotation(1);
tft.fillScreen(TFT_DARKGREY);
tft.setTextFont(2);
Serial.begin(115200);
}
void loop() {
Serial.println("Render");
tft.fillRectHGradient(0, 0, 160, 50, TFT_MAGENTA, TFT_BLUE);
tft.setCursor(10,10);
tft.print("Horizontal gradient");
tft.fillRectVGradient(0, 60, 160, 50, TFT_ORANGE, TFT_RED);
tft.setCursor(10,70);
tft.print("Vertical gradient");
} Uploading Output:
Serial monitor output:
|
If the SHA comparison failed this suggests the new sketch did not load correctly, so probably the previous sketch ran. It may be that there is an issue using certain pins. If you can I would use the pins exactly as in the tested setup provided. |
I have tried the pins you used and the ILI9341 display works fine. I had a look at the display schematic and it does NOT have a 5V to 3.3V regulator so you MUST NOT power from 5V as that will very likely damage the display. If you do indeed have the display here as per your link above, then it is essential you power the display from 3.3V only. If it has failed then ask Waveshare/vendor for a replacement as the information here indicating that you can power from 5V is wrong: The schematic from the link is here: This indicates there is NO regulator fitted. |
Note also that parasitic paths via GPIO from a display powered from 5V could also damage the ECP32 C3, but it is likely to have survived as you have only wired C3 outputs to the display. |
I've hooked up my Waveshare display like shown below but nothing seems to be appearing on the display. The module does have the backlight on though. What am I doing wrong?
Wiring (Display -> ESP32-C3):
Display: Waveshare 1.3inch LCD display Module
Board: ESP32-C3-DevKitC-02
Code:
User_Setup.h (all contents):
The text was updated successfully, but these errors were encountered: