|
M16C62_N Datasheet, PDF (315/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.9 Operation of Timer A (one-shot timer mode)
In one-shot timer mode, choose functions from those listed in Table 2.2.9. Operations of the circled items
are described below. Figure 2.2.20 shows the operation timing, and Figure 2.2.21 shows the set-up
procedure.
Table 2.2.9. Choosed functions
Item
Set-up
Count source
O Internal count source (f1 / f8 / f32 / fc32)
Pulse output function
No pulses output
O Pulses output
Count start condition
External trigger input (falling edge of input signal to the TAiIN pin)
External trigger input (rising edge of input signal to the TAiIN pin)
Timer overflow (TB2/TAj/TAk overflow)
O Writing â1â to the one-shot start flag
Note: j = i â 1, but j = 4 when i = 0; k = i + 1, but k = 0 when i = 4.
Operation (1) Setting the one-shot start flag to â1â with the count start flag set to â1â causes the counter to
perform a down count on the count source. At this time, the TAiOUT pin outputs an âHâ level.
(2) The instant the value of the counter becomes â000016â, the TAiOUT pin outputs an âLâ level,
and the counter reloads the content of the reload register and stops counting. At this time, the
timer Ai interrupt request bit goes to â1â.
(3) If a trigger occurs while a count is in progress, the counter reloads the value in the reload
register again and continues counting. The reload timing is in step with the next count source
input after the trigger.
(4) Setting the count start flag to â0â causes the counter to stop and to reload the content of the
reload register. Also, the TAiOUT pin outputs an âLâ level. At this time, the timer Ai interrupt
request bit goes to â1â.
n = reload register content
FFFF16
(1) Start count
n
(2) Stop count
(3) Start count
Reload
Start count (4) Stop count
Reload
Reload
000116
Count start flag
â1â
â0â
Write signal to
one-shot start flag
One-shot pulse output âHâ
from TAiOUT pin
âLâ
Timer Ai interrupt
â1â
request bit
â0â
Set to â1â by software
1 / fi X (n)
Cleared to â0â by software
Time
1 / fi X (n+1)
Cleared to â0â when interrupt request is accepted, or cleared by software
Figure 2.2.20. Operation timing of one-shot mode
300
|
▷ |