Hey guys,
this is my first post and I just started with Arduino. Before I worked long time with PICxx. All worked fine until I wanted to connect a DEBO LCD 240x240 (Shop Link) with ST7789 interface.
I use a Arduino Micro and using following code:
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
//#include <TimerOne.h>
// LCD Pins
#define TFT_CS 10
#define TFT_RST 9 // Or set to -1 and connect to Arduino RESET pin
#define TFT_DC
int counter = 0;
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
void setup() {
Serial.begin(115200);
// Init LCD
tft.init(240, 240);
tft.fillScreen(ST77XX_BLACK);
delay(500);
tft.setCursor(0, 0);
tft.setTextColor(ST77XX_WHITE);
tft.setTextWrap(true);
tft.print("Hello World");
}
void loop() {
counter++;
Serial.println("Update"+String(counter));
delay(1000);
/*
tft.fillScreen(ST77XX_BLACK);
delay(500);
tft.setCursor(0, 0);
tft.setTextColor(ST77XX_WHITE);
tft.setTextWrap(true);
tft.print("Hello World");
*/
}
But the display is only showing the "Hello World" text after a restart for about 4-5 seconds. Then the text disappears and the display
is black. If i look close its showing some vertical lines in dark grey in the black. I also checked the supply and used an external, but doesn't change anything.
One strange thing is also that i can hear the sound of a disconnecting usb device from my computer also 3-4 seconds after restart. The "UpdateXX" message does not break, so the program is running. When i de comment the part in the loop function its changing nothing.
Also thought about a wrong connections but then i would not get a perfect output directly after start.
Hope you guys can help me I have to say that I'm really happy with the Arduino and the libraries until now
Best regards
Raphael
Edit:
I solved the problem myself. Feeling a bit stupid In the overview for the display is the supply voltage 3.3V... But the board has its own regulator and you need to drive it with 5v...