cbm80amiga / ST7789_AVR

Fast SPI library for the ST7789 IPS display optimized for AVR Arduinos
GNU General Public License v3.0
20 stars 1 forks source link

ST7789 (240*240) gives a blurry vertical lines with Arduino pro micro! #2

Closed HMI1973 closed 3 months ago

HMI1973 commented 3 months ago

I'm working on ST7789 (240*240) from Aliexpress without CS pin, I used Arduino Pro Micro but actually the screen doesn't show the text nor the graphics correctly, it gives a kind of blurry vertical lines.

I enabled "COMPATIBILITY_MODE" in "ST7789_AVR.h" to use SPI instead of assembly "NOP" Approach, this should ensure the code compatible with all Arduino boards.

ST7789 Wiring : wiring

What I get is a blurry result: ST7789

I'm trying to investigate the case but anyone faced this issue before? Code:

#include "src/ST7789_AVR.h"

#define TFT_CS  -1 // without CS
#define TFT_RST  8
#define TFT_DC   9

#define SCR_WD 240
#define SCR_HT 240

ST7789_AVR lcd = ST7789_AVR(TFT_DC, TFT_RST, TFT_CS);
int xx=0;

void setup(void) 
{
    delay(2000);
    Serial.begin(115200);
    lcd.init(SCR_WD, SCR_HT);
    lcd.fillScreen(BLACK);
    lcd.fillScreen(BLUE);
}

void loop()
{
    xx=(xx+1)%40;
    lcd.setCursor(xx, 10);
    lcd.setTextColor(WHITE,BLUE);
    lcd.setTextSize(2);
    lcd.println("HELLO WORLD");
}
HMI1973 commented 3 months ago

After investigation i found the module is damaged when i changed it it work fine!

cbm80amiga commented 3 months ago

Good to know :)