Closed Dresch123 closed 2 years ago
That display seems to be very sensitive to startup conditions. I have found one in my bit box and as you say it does not work with the RP2040. It works with ESP32 and ESP8266 though!
No idea why it does not work, all the signals look good.
There are published instructions on adding a CS control line to these displays. I will try that and see if it changes anything. Thanks.
Yes, adding the CS control pin does allow the ST7789 display to work with the Pico Pi and your library .
The problem with no CS pin is that that spurious clock glitches when the SPI port starts up causes a loss of sync between a particular data bit and the corresponding clock pulse. This means data is shifted and commands look like garbage so the display does not get initialised. The hardware reset is toggled so this would be expected to sync the data, but that does not seem to happen. Maybe biasing the control lines to a known state with pull-ups or pull-downs would help.
The CS line normally does the job of resyncing the bits to each clock pulse, so that is why it works now.
In summary, I think displays without a CS line should be avoided.
It is possible to set the SPI mode in the setuo file by for example adding this line in the setup file:
#define TFT_SPI_MODE SPI_MODE0
I have been able to get 128x128 pixel ST7735 displays working with the Pico Pi. Great!
I recently tried a 240x240 pixel ST7789 display with the Pico Pi and have not gotten anything except a blank screen. This is the display variety without the CS pin. This display works fine with ESP32 and ESP32S2 but not the Pico.
I read in one of your previous posts that SPI MODE 3 must be used with this type of display. Is there a way of invoking this SPI mode with the current library?
Thanks again for this library!