Page 1 of 1

ST7796!

Posted: Wed May 10, 2023 8:35 pm
by jgu1
Hi MM!

Discover When I was making a counter, the number is not delete all when new number come. I mean if counter is shifting from 10 to 11 not all is deleted always after zero. I know I can use print " " for deleting but then the display "flicker" is there anything I can do so the 10 is complete delete?

Try simulate my program, same in real world.

I dont know if it is the same for ILI9488 an ILI9341.

Br Jorgen

Re: ST7796!

Posted: Wed May 10, 2023 9:06 pm
by mnfisher
One possible way to do it is to set the foreground colour the same as the background - re display the number then set colour to black again and display new number. This might be just as jarring visually as the 'space' technique?
ST7796_Standard.fcfx
(14.78 KiB) Downloaded 323 times
Ben's buffered output might help - or use the technique I used to do a fast display and draw to a buffer on the mcu..

Martin

Re: ST7796!

Posted: Wed May 10, 2023 9:27 pm
by RGV250
Hi,
It may not help but I normally print a space or two after the actual number.

Bob

Re: ST7796!

Posted: Thu May 11, 2023 2:57 pm
by jgu1
Hi Martin and Bob!

Thank you for reply. It look like Martin´s examble work. But is it a bug? :D

I have added a counter.


Br jorgen

Re: ST7796!

Posted: Thu May 11, 2023 7:49 pm
by mnfisher
Hi Jorgen,

How does it look on hardware? Is the 'clear' too noticeable? As Bob says - displaying a space (or spaces) after the number is a good way to handle this (but entails converting the number to a string first.
It's not a bug - it just occurs because the characters have different widths (a proportional font). So '1' is a lot narrower than '0'.

Martin

Re: ST7796!

Posted: Sat May 13, 2023 11:20 am
by jgu1
Hi Martin!

It’s the the same on display as in simulation. And yes I know there as different way to clear and I Will tast the best way. Thank`s to both of you :D

Br Jorgen