When I call pinMode(TFT_SCLK, OUTPUT) after tft.init(), the screen doesn't work #2797
-
Hello,@Bodmer, thank you very much for your TFT_ESPI library, it helped me solve a lot of problems. Now I have a tricky problem, I use the ESP32C3 microcontroller, and the ST7789-driven screen (1.3tft), which comes with a font chip (using the SPI communication protocol, sharing SCLK and MOSI pins with the screen) This code doesn't work because I used it in loop
It seems to be in conflict with the TFT_ESPI library, how should I fix it? I added these two lines of code because I have another SPI device (font chip) and screen that share SCLK and MOSI pins. Now my font library and screen can work separately, but putting them together will have problems. Hope to get your help. The following is a more complete code.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To share the SPI pins with the TFT you will need to modify youur code to use the SPI class handle created by the TFT_eSPI library. You can then use that to configure the SPI parameters you need. tft.getSPIinstance() |
Beta Was this translation helpful? Give feedback.
To share the SPI pins with the TFT you will need to modify youur code to use the SPI class handle created by the TFT_eSPI library. You can then use that to configure the SPI parameters you need.
tft.getSPIinstance()