I have been reading lots of threads on the topic but unfortunately none seem to address a usable solution on my side.
My 240x280 LCD screen with a touch panel (Waveshare link) is working under the Adafruit ST7789 library. However, the refresh rate is very slow, it takes about 2.5 seconds to fill the screen, which appears as a wave of pixels running down as they refresh the content. I am currently powering Arduino via USB.
I am using an Arduino Nano Sense 33 Ble Rev2, which is compatible with the 3.3v operating logic of the screen. The screen comes with its own library (see link above under the Resources section), but it is as bad at performing as Adafruit's.
The pins are according to the instructions from the link, i.e.:
LCD Pins | Arduino Pins |
---|---|
VCC | 3.3V |
GND | GND |
MOSI | D11 |
SCK | D13 |
CS | D10 |
DC | D7 |
RST | D8 |
BL | D9 |
TOUCH_SDA | A4 |
TOUCH_SCL | A5 |
TOUCH_RST | D4 |
TOUCH_IRQ | D3 |
I am using examples from the Adafruit library, and the redraw is still visible. As an improvement to my own code, I have added
SPI.beginTransaction(SPISettings(SPI_SPEED, MSBFIRST, SPI_MODE0));
...
SPI.endTransaction();
with SPI_SPEED = 32 MHz (as the Arduino does not appear to support higher speeds according to the Datasheet). I have also added tft.startWrite()
and tft.endWrite()
before each new draw, just in case.
When I refresh specific portions of the screen, it does redraw faster (for obvious reasons), but one can again see the line of pixels running down. As a note, I have attempted to use the TFT_eSPI library, but it keeps thinking I have an RP2040 microcontroller, so I have not been able to compile anything yet. Either way, that is something I can address to the library's owner. What concerns me is that the performance appears to be similar across different libraries.
Can anyone help me figure out what else can be done?