EasyManuals Logo
Home>Renesas>Computer Hardware>M16C Series

Renesas M16C Series User Manual

Renesas M16C Series
380 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #183 background imageLoading...
Page #183 background image
Timer A
M30240 Group
Rev.1.00 Sep 24, 2003 Page 165 of 360
2.2.2.10 Pulse width modulation mode - 16-bit PWM mode selected
In pulse width modulation mode, select functions from those listed in Table 2.11 . An example using the
indicated options is described below. Figure 2.25 shows the operation timing, and Figure 2.26 shows
the set-up procedure.
Table 2.11: Timer A pulse width modulation mode, 16-bit PWM mode functions
Note: j = i, but j = 4 when i = 0; k = j + 1 when i = 4
Operation
(1) If the TAi
IN
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 TAi
OUT
pin outputs an “H” level.
(2) The TAi
OUT
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 TAi
OUT
outputs an “L” level.
Notes
The period of PWM pulses becomes (2
16
– 1)/fi, and the “H” level pulse width becomes n/fi. If the Timer Ai
register is set to “0000
16
” the pulse width modulator does not work, and the TAi
OUT
pin output level remains
at “L”.
(fi: frequency of the count source f1, f8, f32; n: value of the timer)
Figure 2.25: Operation timing of pulse width modulation mode, 16-bit PWM mode selected
Item
Set-up
Count source O Internal count source (f1/f8/f32)
PWM mode
O 16-bit PWM
8-bit PWM
Count start condition
External trigger input (falling edge of input signal to the TAi
IN
pin)
O
External trigger input (rising edge of input signal to the TAi
IN
pin)
Timer overflow (TB2/TAj/TAk overflow)
Count source
TA
iIN pin
input signal
PWM pulse output
from TA
iOUT pin
Timer Ai interrupt
request bit
Count start flag
1 / fi X (2 1)
16
Conditions: Reload register = 000316, external trigger (rising edge of TAi IN pin input signal) is selected
Trigger is not generated by this signal
"H"
"H"
"L"
"L"
"1"
"0"
Cleared to "0" when interrupt request is
accepted, or cleared by software
1 / fi X n
"1"
"0"
Set to "1" by software
(1) Start count
(2) Output level "H" to "L"
Note: n = 0000
16 to FFFE16
(3) One period is complete
(4) Stop count
Cleared to "0"
by software

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas M16C Series and is the answer not in the manual?

Renesas M16C Series Specifications

General IconGeneral
BrandRenesas
ModelM16C Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals