Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated Real time clock TIM0 functionality description

...

The clock is reset to zero by settings RESTIM in the COM register. The clock will be held in reset, ie. it won't count until RESTIM is cleared again. In order to guarantee a valid result from any of these registers, software needs to read until two equal values are returned. This should always occur within three read cycles.

A second has passed (TIM1 is increased) when TIM0 reaches 128 ($80) - TIM0 continues to count to 199 then wraps to 0.

There are three interrupts that the real time clock can generate and these are TICK (200 times a second - 5ms), SEC (once a second) and MIN (once a minute). Three registers are associated with these interrupts:

...