M30245_06 RENESAS [Renesas Technology Corp], M30245_06 Datasheet - Page 40

no-image

M30245_06

Manufacturer Part Number
M30245_06
Description
RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/20 SERIES
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
M30245 Group
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
Operation
Note
Figure 2.2.25. Operation timing of pulse width modulation mode, with 8-bit PWM mode selected
2.2.11 Operation of Timer A (pulse width modulation mode, 8-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.25 shows the operation timing, and Figures 2.2.26 and
2.2.27 show the set-up procedure.
Count source (Note 1)
Count start flag
TA
Underflow signal of 8-bit
prescaler (Note 2)
PWM pulse output from
TA
Timer Ai interrupt
request bit
iIN
iOUT
Table 2.2.11. Choosed functions
Note: j = i – 1, but j = 4 when i = 0; k = i + 1, but k = 0 when i = 4.
(1) If the TAi
(2) The TAi
(3) The counter reloads the content of the reload register every time PWM pulses are output for
(4) Setting the count start flag to “0” causes the counter to hold its value and to stop. Also, the
• The period of PWM pulses becomes (m + 1) X (2
• When a trigger is generated, the TAiout pin outputs “L” level of same amplitude as “H” level of
• Set TAi
pin input
(fi : frequency of the count source f
pin
Count source
PWM mode
Count start condition
Conditions:
becomes n X (m + 1) / fi. If “00
pulse width modulator does not work, and the the TAi
the set PWM pulse, after which it starts PWM pulse output.
performs a down count on the count source. Also, the TAi
time, the timer Ai interrupt request bit goes to “1”.
one cycle, and continues counting.
TAi
OUT
Item
IN
page 31 of 354
Reload register high-order 8 bits = 02
Reload register low-order 8 bits = 02
External trigger (falling edge of TAi
pin's port direction register to “0”.
OUT
Note 1: The 8-bit prescaler counts the count source.
Note 2: The 8-bit pulse width modulator counts the 8-bit prescaler's underflow signal.
Note 3: m = 00
pin outputs an “L” level.
IN
pin input level changes from “H” to “L” with the count start flag set to “1”, the counter
“H”
“H”
“H”
“1”
“0”
“1”
“0”
“L”
“L”
“L”
pin output level changes from “H” to “L” when a set time period elapses. At this
O
O
O
(1) Start count
16
to FE
Internal count source (f
16-bit PWM
8-bit PWM
External trigger input (falling edge of input signal to the TAi
External trigger input (rising edge of input signal to the TAi
Timer overflow (TAj/TAk overflow)
16
; n = 00
16
” is set in the eight higher-order bits of the timer Ai register, the
16
IN
to FE
1
16
pin input signal) is selected
16
, f
1 / f
(2) Output level “H” to “L”
8
16
, f
1 / f
1 / f
i
.
X (m+1)
32
1
i
i
X (m + 1) X n
, fc
/ f
X (m + 1) X (2 – 1)
8
32
/ f
32
; n : value of the timer)
Cleared to “0” when interrupt request
is accepted, or cleared by software
/ fc
32
8
)
Set-up
8
– 1) / fi, and the “H” level pulse width
OUT
pin output level remains at “L”.
OUT
pin outputs an “H” level.
(3)
One period is
complete
IN
IN
pin)
pin)
(4) Stop count
2. Timer A

Related parts for M30245_06