I am trying to get the ST7789 TFT display to work with Arduino. I followed online guides for connections and am using the fast library fron github and included workbench ino (https://github.com/cbm80amiga/Arduino_ST7789_Fast). Problem: The program runs and drives the display but the image is corrupt and only partial. I discovered that if I quickly and firmly press the reset button - and keep it pressed down - the image at the moment of reset press suddenly becomes full and good (albeit static because reset is pressed). Ofcourse as soon as I release the reset button the program restarts with the same corrupt image (the pictures below illustrate the issue).
I could not find a description of this particular problem by online searching. Here is what I tried to fix it (all to no avail):
- I confirmed all pins are correct as defined in the ino script.
- I ensure only the 3.3v power line is used. I have never connected the Vcc to 5 v
- I tried with a genuine Arduino UNO as well as a clone - both show the same behaviour.
- I used 1k:2k resistor voltage dividers for the data lines, res and DC - these did not help. In fact the display did not work at all with the voltage dividers, only the backlight came on and the screen flickered slightly. I checked that I was getting ~3v in the middle of each divider.
- I used two separate ST7789 display boards, bought from two separate sellers on different occasions - both show the same behaviour.
[Edits in response to comments below]
- The same behviour occurs when using a sketch that uses the standard Adafruit libraries (as opposed to the fast library linked above).
- The same corruption is seen when run on an arduino nano clone. However, with the nano, pressing the reset button shows only a fleeting glimpse of the full image prior to resetting (i.e. holding down the reset button does not preserve a static image on the screen).
Any ideas about what is going on and how to fix it? Thanks.
fillScreen()
) in a loop?