Periodic Rollover

The timer can be configured for continuous periodic operation as per the settings shown in Table 2-1.
Table 1. Timer Configuration
Timer Setting Value
START None (ON = 1)
RESET At PR Match
STOP None
CSYNC (Clock Sync) Sync
PR (Period Register) Desired Period Value - 1 (e.g., for a desired period of 20, PR = 19)

The counter counts until a PR match occurs, and then rolls over to zero and continues counting. At PR match, the PRIF interrupt and output pulse occur. At the following clock, the counter returns to zero and the ZIF interrupt occurs. This is shown in Figure 2-1.

If RESET = None, the counter will rollover at the maximum value of the timer (0xF...FF) with ZIF, but the output pulse and PRIF will occur at PR match. This is shown in Figure 2-2.

The software can capture (read) the counter value using CAPT command at any time.
Figure 1. Periodic Rollover With Reset
Figure 2. Periodic Rollover Without Reset