CHAPTER 8 WATCH TIMER
User’s Manual U13850EJ6V0UD
258
8.4 Operation
8.4.1 Operation as watch timer
The watch timer operates at time intervals of 0.5 seconds with the subclock (32.768 kHz).
The watch timer generates an interrupt request at fixed time intervals.
The count operation of the watch timer is started when bits 0 (WTNM0) and 1 (WTNM1) of the watch timer mode
control register (WTNM) are set to 1. When these bits are cleared to 0, the 11-bit prescaler and 5-bit counter are
cleared, and the watch timer stops the count operation.
The watch timer clears the 5-bit counter by setting the WTNM1 bit to 0. At this time, an error of up to 15.6 ms may
occur.
The interval timer can be cleared by setting the WTNM0 bit to 0. However, because the 5-bit counter is cleared at
the same time, an error of up to 0.5 seconds may occur when the watch timer overflows (INTWTN).
8.4.2 Operation as interval timer
The watch timer can also be used as an interval timer that repeatedly generates an interrupt at intervals specified
by a count value set in advance.
The interval time can be selected by bits 4 to 6 (WTNM4 to WTNM6) of the watch timer mode control register
(WTNM).
Table 8-3. Interval Time of Interval Timer
WTNM6
WTNM5
WTNM4
Interval Time
f
W
= 32.768 kHz
0
0
0
2
4
×
1/f
W
488
µ
s
0
0
1
2
5
×
1/f
W
977
µ
s
0
1
0
2
6
×
1/f
W
1.95 ms
0
1
1
2
7
×
1/f
W
3.91 ms
1
0
0
2
8
×
1/f
W
7.81 ms
1
0
1
2
9
×
1/f
W
15.6 ms
1
1
0
2
10
×
1/f
W
31.2 ms
1
1
1
2
11
×
1/f
W
62.4 ms
Remark
f
W
: Watch timer clock frequency
Содержание V850/SB1
Страница 2: ...User s Manual U13850EJ6V0UD 2 MEMO ...