|
M16C62_M Datasheet, PDF (361/615 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES | |||
|
◁ |
Timer B
Mitsubishi microcomputers
M16C / 62A Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
2.3.3 Operation of Timer B (event counter mode)
In event counter mode, choose functions from those listed in Table 2.3.2. Operations of the circled items are
described below. Figure 2.3.6 shows the operation timing, and Figure 2.3.7 shows the set-up procedure.
Table 2.3.2. Choosed functions
Item
Set-up
Count source
O Input signal to the TBiIN pin (counting falling edges)
Input signal to the TBiIN pin (counting rising edges)
Input signal to the TBiIN pin (counting rising edges and falling edges)
Timer overflow(TBj overflow)
Note: j = i â 1, but j = 2 when i = 0, j = 5 when i = 3
Operation (1) Setting the count start flag to â1â causes the counter to count the falling edges of the count
source.
(2) If an underflow occurs, the content of the reload register is reloaded, and the count continues.
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.
n = reload register content
FFFF16 (1) Start count
(2) Underflow
n
(3) Stop count
Start count again
000016
Count start flag
â1â
â0â
Timer Bi interrupt â1â
request bit
â0â
Set to â1â by software
Cleared to â0â by
software
Time
Set to â1â by softwar
Cleared to â0â when interrupt request is accepted, or cleared by software
Figure 2.3.6. Operation timing of event counter mode
2-44
|
▷ |