Not a bad idea. A clock does always comes in handy.
The last 2 digits were put upside down so as to get a colon from combining the two dot points on the oppositely placed standard 7-segment displays. An extra lookup table was the overhead.
If the clock is loosing or gaining time, you can adjust bres_lo reload value in the ISR.
(+.25 sec/day = bres_lo - 8 , -.25sec/day = bres_lo + 8).
Running it on a battery down to 2.1v will be the ultimate test.
My chip seems to have no problem till 2.1v. Below that the oscillator stalls and below 0.9v the ram gets corrupted.
Bookmarks