Mike Chambers
Well-known member
I got this 4" 320x480 ST7796 LCD from Amazon. I'm trying to use it in my project, but whenever I try to use the async display mode to speed things up, the output is complete garbage.
I'm initializing the tft with this:
And here's my code for the init:
Then when I fill in fbout and use tft.updateScreen() as in the non-async one, it looks perfect, like this:
All is well and good, right? Well, when I change that line to tft.updateScreenAsync(false); then it looks like this. If you look closely, there are a few messed up blue lines at the top. You can see a few white pixels in there from some of the text too.
Any idea what's wrong? Is the library just broken for the ST7796? If so, how do I fix it? I really, really need async. Normal update is just too slow for this project.
I'm initializing the tft with this:
C:
// For 3.5" or 4.0" TFT with ST7796
ST7796_t3 tft = ST7796_t3(TFT_CS, TFT_DC, TFT_RST);
And here's my code for the init:
C:
tft.init(320, 480);
tft.fillScreen(ST7735_BLACK);
tft.setRotation(3);
tft.useFrameBuffer(true);
fbout = tft.getFrameBuffer();
Then when I fill in fbout and use tft.updateScreen() as in the non-async one, it looks perfect, like this:
All is well and good, right? Well, when I change that line to tft.updateScreenAsync(false); then it looks like this. If you look closely, there are a few messed up blue lines at the top. You can see a few white pixels in there from some of the text too.
Any idea what's wrong? Is the library just broken for the ST7796? If so, how do I fix it? I really, really need async. Normal update is just too slow for this project.