|
M16C62_M Datasheet, PDF (347/615 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES | |||
|
◁ |
Timer A
Mitsubishi microcomputers
M16C / 62A Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
2.2.11 Operation of Timer A (pulse width modulation mode, 16-bit PWM mode selected)
In pulse width modulation mode, choose functions from those listed in Table 2.2.11. Operations of the
circled items are described below. Figure 2.2.24 shows the operation timing, and Figure 2.2.25 shows the
set-up procedure.
Table 2.2.11. Choosed functions
Item
Set-up
Count source
O Internal count source (f1 / f8 / f32 / fc32)
PWM mode
O 16-bit PWM
8-bit PWM
Count start condition
External trigger input (falling edge of input signal to the TAiIN pin)
O External trigger input (rising edge of input signal to the TAiIN pin)
Timer overflow (TB2/TAj/TAk overflow)
Note: j = i â 1, but j = 4 when i = 0; k = i + 1, but k = 0 when i = 4.
Operation (1) If the TAiIN pin input level changes from âLâ to âHâ with the count start flag set to â1â, the counter
performs a down count on the count source. Also, the TAiOUT pin outputs an âHâ level.
(2) The TAiOUT pin output level changes from âHâ to âLâ when a set time period elapses. At this
time, the timer Ai interrupt request bit goes to â1â.
(3) The counter reloads the content of the reload register every time PWM pulses are output for
one cycle, and continues counting.
(4) Setting the count start flag to â0â causes the counter to hold its value and to stop. Also, the
TAiOUT outputs an âLâ level.
Note
⢠The period of PWM pulses becomes (216 â 1)/fi, and the âHâ level pulse width becomes n/fi. If
the timer Ai register is set to â000016â, the pulse width modulator does not work, and the
TAiOUT pin outputs âLâ level, therefore the timer Ai interrupt request is not generated.
(fi : frequency of the count source f1, f8, f32, fC32; n : value of the timer)
Conditions: Reload register = 000316, external trigger (rising edge of TAiIN pin input signal) is selected
1 / fi X (216 â1)
Count source
âHâ
TAiIN pin
input signal
âLâ
Count start flag
â1â
â0â
PWM pulse output âHâ
from TAiOUT pin
âLâ
Timer Ai interrupt â1â
request bit
â0â
Trigger is not generated by this signal
Set to â1â by software
Cleared to â0â
by software
(1) Start count
(2) Output level âHâ to âLâ
(3) One period is complete
1 / fi X n
(4) Stop count
Cleared to â0â when interrupt request is
accepted, or cleared by software
Note: n = 000016 to FFFE16
Figure 2.2.24. Operation timing of pulse width modulation mode, 16-bit PWM mode selected
2-30
|
▷ |