|
M16C62_N Datasheet, PDF (309/621 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY | |||
|
◁ |
Timer A
Mitsubishi microcomputers
M16C / 62 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
2.2.6 Operation of Timer A (event counter mode, free run type selected)
In event counter mode, choose functions from those listed in Table 2.2.5. Operations of the circled items
are described below. Figure 2.2.14 shows the operation timing, and Figure 2.2.15 shows the set-up
procedure.
Table 2.2.5. Choosed functions
Item
Count source
Set-up
O
Input signal to TAiIN
(counting falling edges)
Input signal to TAiIN
(counting rising edges)
Timer overflow
(TB2/TAj overflow)
Item
Set-up
Pulse output function O
Count operation type
O
Factor for switching O
between up and
down
No pulses output
Pulses output
Reload type
Free-run type
Content of up/down flag
Input signal to TAiOUT
Note: j = i â 1, but j = 4 when i = 0
Operation (1) Setting the count start flag to â1â causes the counter to count the falling edges of the count
source.
(2) Even if an underflow occurs, the content of the reload register is not reloaded, but the count
continues. At this time, the timer Ai interrupt request bit goes to â1â.
(3) If switching from an up count to a down count or vice versa while a count is in progress, the
switch takes effect from the next effective edge of the count source.
(4) Even if an overflow occurs, the content of the reload register is not reloaded, but the count
continues. At this time, the timer Ai interrupt request bit goes to â1â.
n = reload register content
(2) Underflow
FFFF16
(1) Start count
n
(3) Switch count
(4) Overflow
000016
â1â
Count start flag
â0â
â1â
Up/down flag
â0â
Timer Ai interrupt â1â
request bit
â0â
Set to â1â by software
Time
Set to â1â by software
Cleared to â0â when interrupt request is accepted, or cleared by software
Figure 2.2.14. Operation timing of event counter mode, free run type selected
294
|
▷ |