Waveshare 2.8inch lcd display faded text

Hi there

I have an issue with my waveshare display (https://www.waveshare.com/2.8inch-resistive-touch-lcd.htm)

So it has a ST7789D display driver, so I use the AdafruitST77XX Library (Adafruit ST7735 and ST7789 Library). However, after modifying the example to simply display some text, something very strange happens

The text is faded, like its missing some pixels. However, when pressing the reset button on the arduino, or programming the board the text is displayed perfectly. Also, if i connect the RST wire to the arduino RESET pin instead of the Digital pin, this text becoming better effect disappears

I'm guessing this is a hardware issue, as there's no way the text can be displayed perfectly on the reset button press or programming, but not when program running

I have the idea of using a HX8347D library instead, but I cannot find a library that uses this screens pins (e.g MOSI)

I have the code and the pictures below, if you have any libraries or suggestions please let me know

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>


  // For the breakout board, you can use any 2 or 3 pins.
  // These pins will also work for the 1.8" TFT shield.
#define TFT_CS        10
#define TFT_RST        9 // Or set to -1 and connect to Arduino RESET pin
#define TFT_DC         8

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
float p = 3.1415926;

void setup(void) {
  // OR use this initializer (uncomment) if using a 2.0" 320x240 TFT:
  tft.init(240, 320);           // Init ST7789 320x240
  uint16_t time = millis();
  time = millis() - time;
}

void loop() {
  testDisplay();
  delay(5000);

}

void testdrawtext(char *text, uint16_t color) {
  tft.fillScreen(ST77XX_BLACK);
  tft.setCursor(0, 0);
  tft.setTextColor(color);
  tft.setTextWrap(true);
  tft.print(text);
}

void testDisplay(){
  testdrawtext("Sentence One ", ST77XX_WHITE);
  delay(10000);
  testdrawtext("Sentence Two ", ST77XX_WHITE);
}

Wiring: 5V - 5V, GND-GND, MOSI-D11, SCLK-D13, CS-D10, DC-D8, RST-D9, BL-3.3V

Hello @tf07.

Why do you think so? Your program prints "Sentence One ", waits 10 seconds, prints "Sentence Two ", waits 5 seconds then prints "Sentence One " again. I think this is the problem and it is software. Before you print text, you erase the entire display and this can take a few seconds and a lot depends on the microcontroller but you didn't say what Arduino you are using. Try making both delays 10 seconds or even longer.

Hi @flashko

Thanks for your input!

I'm using the uno, and I tried adding some more delay between printing sentence two and sentence one. also after "fillScreen" I added 10 sec delay.

Neither of these worked, and the text is still faded. I assumed this was a hardware issue because I couldn't see how my code was incorrect.

The only other thing I can assume is using a HX8347D library instead of the ST7789 adafruit library, but I can't find a library for it

Hi,

Have you ever managed to find the problem. I just received 320x240 ST7789v display and have the same issue.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.