
315
12.5 Operation of Watch Prescaler
The watch prescaler has the interval timer function and the clock supply function.
s Operation of Interval Timer Function (Watch Prescaler)
Figure 12.5-1 "Interval Timer Function Settings" shows the settings required to operate the
interval timer function.
Figure 12.5-1 Interval Timer Function Settings
Provided the subclock is oscillating, the watch prescaler 15-bit counter (continues to count-up
using the subclock as its count clock).
After being cleared (WCLR = "0"), the counter restarts counting-up from "0000H". When the
counter reaches a full count of "7FFFH", the next count takes it "0000H" and it continues to
count-up. As the count proceeds, a falling edge will eventually occur at the selected divided
clock output. At this time, unless the system is in main clock stop mode, the watch prescaler
sets the watch interrupt request flag bit (WIF) to "1".
Consequently, the watch prescaler
generates interrupt requests at fixed intervals (the selected interval time), based on the time that
the counter is cleared.
s Operation of Clock Supply Function
The watch prescaler is also used as a timer to generate the subclock oscillation stabilization
delay time. The time between the counter cleared state and the falling edge of the MSB output
is used the subclock oscillation stabilization delay time (215/FCL, where FCL is subclock source
oscillation).
The watch prescaler also provides the clock for the watchdog timer. When the watch prescaler
is selected as the clock source for the watchdog timer (WDTC: CS = 1) both counters are
cleared simultaneously.
s Operation of Watch Prescaler
Figure 12.5-2 "Operation of Watch Prescaler" shows counter states when the interval timer is
operating in subclock mode and the system goes into the sleep and stop modes, and when
there is a counter clear request.
Bit 7Bit 6Bit 5Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
WPCR
WIF
WIE
—
WS1
WS0
WCLR
01
0
: Used bit
1 : Set "1"
0 : Set "0"