PicoMite demo on the Waveshare RP2040-LCD-1.28


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11866
Posted: 04:34pm 01 Jan 2023      

  Quote  Is this a balancing act between when it is faster to write to and blit the entire buffer vs. when when it is faster to perform the individual drawing instructions "directly" on the display ... or do I misunderstand how these SPI displays work ?


Not really
The big issue with all these displays is "undrawing" something. Consider the demo but without the framebuffers
Think of the hands of the clock. To move the second hand I need to:
1: restore the background that was under it
2: save the background where I am now going to draw it
3: draw the hand in the new position

All this takes time and the result is that the hand flickers from one location to the next.
This is improved if the background is a flat colour as I can miss step 2 but I still get flicker
It can be improved again if I can time the moves with the displays raster but his is impossible on many displays (anything without a working MISO, and even with difficult) such as the demo display.

The framebuffer solves this as I can assemble the image in a framebuffer where all these moves are invisible and then just paint the completed image (COPY) or the part that has changed (BLIT) to the actual display.

Copying framebuffer to framebuffer takes less than a millisecond. Copying the complete image to the display in the demo takes 50mSec @ default CPU speed and 46 @ 378MHz