193
7.5 Operation of the Watch Prescaler
7.5
Operation of the Watch Prescaler
The watch prescaler operates to provide the interval timer function and clock supply
function.
I
Operation of the Interval Timer Function (Watch Prescaler)
The setting in Figure 7.5-1 "Setting of the Interval Timer Function" is required for the operation
of the interval timer function.
Figure 7.5-1 Setting of the Interval Timer Function
The 15-bit counter of the watch prescaler continues to count up the subclock provided the
subclock oscillates.
If the counter is cleared (WCLR=0), it starts to count up from "00000
H
". When "1FFFF
H
" is
reached, counting continues starting from "00000
H
". When a falling edge is generated in the
selected divide-by output for the interval timer, if not in main stop mode, "1" is set to the watch
interrupt request flag bit (WIF). That is, starting with the time when cleared, a watch interrupt
request is generated at regular intervals of the selected time.
I
Operation of the Clock Supply Function
The watch prescaler is also used as a timer to generate the oscillation stabilization wait time of
the subclock. Counting of the oscillation stabilization wait time of the subclock (2
15
/F
CL
, F
CL
:
subclock oscillation) starts when the watch prescaler is cleared and ends when the highest bit
falls.
The watch prescaler supplies the clock to the watchdog timer and buzzer output. When the
counter of the watch prescaler is cleared, operations of the buzzer output are affected. The
counter of the watchdog timer is cleared at the same time if the watch prescaler output is
selected (WDTC: CS=1).
I
Operations of the Watch Prescaler
Figure 7.5-2 "Operations of the Watch Prescaler" shows the counter values if a transition to the
sleep mode or stop mode occurs, or the counter clearing is requested when the interval timer
function is operating in subclock mode.
The transition to the watch mode is the same as that to the sub-sleep mode.
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
WPCR
WS0 WCLR
WS1
1
0
0
WIE
WIF
: Bit used
1 : 1 is set
0 : 0 is set
WS2