LCD Animation without flickering

Recently bought the nueltronics 2,4 TFT LCD screen

http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=18&zenid=6e79f2e540d93c5779f224676f7bb3e4

My problem is though: When i tried to make a circle that scales according to the analog input from an photoressistor. Ive tried several methods to remove the flicker that comes from updating the circle size, but its always flickering.

first i tried using the build in function called ClearScreen() like

void loop()
{
draw();
tft.ClearScreen(BLACK);
}

But this generated massive flickering, and i understand why because the screen has to reset all the pixels every time it redraws. Adding a delay between the two helped a little but it still flickered.

Secondly i tried using the DrawCircle() function to erase the ring after a small delay in the draw() function. so it went;

Not writing code in full detail as its not needed to understand what i mean.

void draw()
{
uint16_t r = readAnalog(input);
tft.DrawCircle(Size based on r,Color White);
delay(theDelay);
tft.DrawCircle(Size based on r, Color Black);
}

But this also created flicker; even with high delay, considerably less than with the ClearScreen function though.
My last thought is to save the last data and erase the last ring in the next draw.

void draw()
{
uint16_t r = readAnalog(input);
tft.DrawCircle(New Circle,White);
tft.DrawCircle(Old Circle,Black);
unit16_t old = r; <- probably has to be declared globaly so not to be lost inbetween runs.
}

Is there any techniques i can use to get around the flickering, methods i havent tried, or is the limitation on the screen just that great that animation is unfeasable. The screen is capable of drawing 10-15 rings in different size and color in an an instant, so im pretty sure its my inexperience with coding graphics that is limiting me right now.

All feedback is welcome and appreciated.

-Thomas

My last thought is to save the last data and erase the last ring in the next draw.

What happened with this code?

unit16_t old = r; <- probably has to be declared globaly so not to be lost inbetween runs.

Local is fine, but it needs to be static.

Normally to get flicker-free graphics you write to an off-screen buffer then blat the data across onto the screen.

Does that display have options that allow drawing into memory then copying the data across to screen memory.

EDIT: I just looked at the data sheets, it doesn't look like it.


Rob

You need to syncronised your writing to the scanning of the display so the pixels you are writing are not being displayed at the same time. Normally this is done at the frame flyback time. However it might be that access to your display is too slow with an arduino to do all the writing before the screen is refreshed again.