Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slow display initialization #190

Open
HIGHCATDOM opened this issue Aug 1, 2023 · 0 comments
Open

slow display initialization #190

HIGHCATDOM opened this issue Aug 1, 2023 · 0 comments

Comments

@HIGHCATDOM
Copy link

HIGHCATDOM commented Aug 1, 2023

Hey guys,
I don't know if this is actually an issue, but during my current project, I found out that each time I use the tft.initR() command, it takes over one second around 1160 ms) to initialize the display, no matter on which hardware I try it (with hardware SPI).

So in my attached example, i first init the display size and after that I set the right color scheme, which means that my total boot time is almost 2.5 s. Is this normal/intended, is it an efficiency issue of the library, or am I using the bib wrong?

Thanks for your feedback!

Here is my setup:

  • Arduino board: Any Arduino board (Mega & Nano tested) as well as Wemos D1 mini
  • Arduino IDE version 2.1.1
  • Code snipped:

`
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <SPI.h>

// pinout wemos D1 mini
#define TFT_BLK D0 // backlight control (high, low)
#define TFT_RST D3 // to "RES" in display
#define TFT_DC D4 // to "DC" in display
#define TFT_SCLK D5 // to "SCL" in display
#define TFT_MOSI D7 // to "SDA" in display
#define TFT_CS D8 // to "CS" in display

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

void setup(void) {

long boot_time = millis();
pinMode(TFT_BLK, OUTPUT);
digitalWrite(TFT_BLK, LOW);

Serial.begin(115200);
Serial.println("\n\n----- Setup Start -----");

// init display size and color scheme
tft.initR(INITR_MINI160x80);
long t1 = millis();
Serial.println(" -> Time init 160x80: " + String(t1-boot_time) + " ms");

tft.initR(ST7735_MADCTL_BGR);
tft.setRotation(3);
tft.setTextWrap(false);
long t2 = millis();
Serial.println(" -> Time display: " + String(t2-t1) + " ms");

// do something
tft.fillScreen(ST77XX_RED);
digitalWrite(TFT_BLK, HIGH);

Serial.println("Total boot time: " + String(millis()-boot_time) + " ms");
Serial.println("\n\n----- Setup Finished -----\n");
}

void loop() {

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant