Timer B
M30240 Group
Rev.1.00 Sep 24, 2003 Page 174 of 360
2.3.2 Operation
2.3.2.1 Timer mode
In timer mode, select functions from those listed in Table 2.13 . An example using the indicated options
is described below. Figure 2.36 shows the operation timing, and Figure 2.37 shows the set-up
procedure.
Table 2.13: Timer B timer mode functions
Operation
(1) Setting the count start flag to “1” causes the counter to perform a down count on the count source.
(2) If an underflow occurs, the content of the reload register is reloaded, and the counter continues
counting. At this time, the Timer Bi interrupt request bit goes to “1”.
(3) Setting the count start flag to “0” causes the counter to hold its value and to stop.
Figure 2.36: Operation timing of timer mode
Item
Set-up
Count source O Internal count source (f1/f8/f32)
FFFF
16
n
0000
16
Time
Count start flag
Timer Bi interrupt
request bit
“1”
“1”
Counter content (hex)
n = reload register content
Set to “1” by software
“0”
“0”
Set to “1” by software
Cleared to “0” by
software
(2) Underflow (3) Stop count(1) Start count
Cleared to “0” when interrupt request is accepted, or cleared by software
Start count
again