Closed eagl1 closed 1 year ago
To avoid flickering the refresh rate must be greater than 30 fps. Soon the sum of delays must be smaller than 1/30 s (33.33 ms/4 = 8.33ms). If you set all delays to 5ms the code will work without flicker. If you use different delays for each display the brightness will be different between the displays.
OK, I did it but how to show a static number for example ? or count on specific timing ?
Because now it's too fast.
You can try:
unsigned int time=0;
unsigned int count=0;
while(1){
seven_segment_display(count); // 20ms total delay ;
time += 20; //increment 20 ms
if( time >= 1000 ){ //each 1 second
time=0;
count++;
}
}
Thank you so much :)
Problem solved.
bye
Hi,
I'm trying to write the proper code to write data to the 4 digit 7 segment modules.
This is my code:
I tried to set the delay time to a constant value between all the 4 stages, but there's flickering. So with modifications I concluded to this setup, there's no flickering but there are the first digit has good brightness and the last one is the least brightness.
Do you have a solution for this ?
Thank you,