|
M16C62_M Datasheet, PDF (509/615 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES | |||
|
◁ |
Timer A Applications
Mitsubishi microcomputers
M16C / 62A Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
3.1 Long-Period Timers
Overview In this process, Timer A0 and Timer A1 are connected to make a 16-bit timer with a 16-bit
prescaler. Figure 3.1.1 shows the operation timing, Figure 3.1.2 shows the connection dia-
gram, and Figures 3.1.3 and 3.1.4 show the set-up procedure.
Use the following peripheral functions:
⢠Timer mode of timer A
⢠Event counter mode of timer A
Specifications
(1) Set timer A0 to timer mode, and set timer A1 to event counter mode.
(2) Perform a count on count source f1 using timer A0 to count for 1 ms, and perform a count
on timer A0 using timer A1 to count for 1 second.
(3) Connect a 16-MHz oscillator to XIN.
Operation (1) Setting the count start flag to â1â causes the counter to begin counting. The counter of
timer A0 performs a down count on count source f1.
(2) If the counter of timer A0 underflows, the counter reloads the content of the reload register
and continues counting. At this time, the timer A0 interrupt request bit goes to â1â. The
counter of timer A1 performs a down count on underflows in timer A0.
(3) If the counter of timer A1 underflows, the counter reloads the content of the reload register
and continues counting. At this time, the timer A1 interrupt request bit goes to â1â.
l = reload register content
FFFF16 (1) Start count (2) Timer A0 underflow
l
(3) Timer A1 underflow
000016
n = reload register content
FFFF16
Start count.
Time
n
000016
Timer A0 count â1â
start flag
â0â
Timer A1 count â1â
start flag
â0â
Timer A0 interrupt â1â
request bit
â0â
Timer A1 interrupt â1â
request bit
â0â
Set to â1â by software
Cleard â0â by software
Time
Set to â1â by software
Cleared to â0â when interrupt request is accepted, or cleared by software
Figure 3.1.1. Operation timing of long-period timers
2-192
|
▷ |