Setting a default background on TFTLCD screen

Dear All,

I have an ILI9341 TFTLCD display working with an Arduino Mega and the Adafruit library. With some tweaks I'm able to refresh it fast enough while displaying text.

The only problem is when I turn it on and need to fill the whole screen to set the background. It takes around ~600ms.

I use the same background for the whole program, so I was wondering if it's possible to "hardcode" the color somewhere, so that every time the display is turned on, it's already filled with the background I want.

For a Mcufriend Uno Shield:
It takes about 135ms to fillScreen() on a Uno.
It will be about 2x for a Mega.

For a 16-bit Mega Shield:
It will take about 30ms for fillScreen()

No. You can't store a 240x320 background in memory.
It is faster to draw it from scratch.

David.

Thanks for the information David. I'll probably look for another display then.

But just to be clear, by background I mean just a solid color, not an image/shape etc.

Adafruit_TFTLCD works well but is not the fastest library.
The limitation is mostly down to the Shield wiring. Uno shields work on a Mega but are slow.

600ms sounds very slow. But surely you can live with it at setup().
If you do a lot of graphics in loop(), the slow speed would be annoying.
Buy a HX8357/ILI9481 Mega Shield. Bodmer's library is fast with these shields.

David.

I have a 3,5'' ILI9481 TFT LCD shield. But I don't know what makes it so slow to refresh the background. Just can't make it work with Bodmer's library for now (posted a message on the other thread).

Anyway, thanks a lot for your help!