Pulse Width Modulation (Pwm) Mode - Renesas M16C/60 Series Hardware Manual

Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

Under development
This document is under development and its contents are subject to change.
M16C/6N5 Group

4. Pulse Width Modulation (PWM) Mode

In PWM mode, the timer outputs pulses of a given width in succession. The counter functions as either
16-bit pulse width modulator or 8-bit pulse width modulator.
Table 1.13.5 lists specifications in PWM mode. Figure 1.13.12 shows TAiMR register in PWM mode.
Figures 1.13.13 and 1.13.14 show examples of how a 16-bit pulse width modulator operates and how an
8-bit pulse width modulator operates, respectively.
Table 1.13.5 Specifications in PWM Mode
Item
Count source
Count operation
16-bit PWM
8-bit PWM
Count start condition
Count stop condition
Interrupt request generation timing
TAi
pin function
IN
TAi
pin function
OUT
Read from timer
Write to timer
i = 0 to 4
Rev.1.00
2003.05.30
page 111
f
, f
, f
, f
, f
1
2
8
32
C32
• Down-count (operating as an 8-bit or a 16-bit pulse width modulator)
• The timer reloads a new value at a rising edge of PWM pulse and continues counting
• The timer is not affected by a trigger that occurs during counting
• High level width n / fj
16
• Cycle time (2
-1) / fj fixed
• High level width n ✕ (m+1) / fj
8
-1) ✕ (m+1) / fj m : set value of TAiMR register low-order address
• Cycle time (2
• TAiS bit of TABSR register is set to "1" (start counting)
• TAiS bit = 1 and external trigger input from the TAi
• TAiS bit = 1 and one of the following external triggers occurs
Timer B2 overflow or underflow,
timer Aj (j = i - 1, except j = 4 if i = 0) overflow or underflow,
timer Ak (k = i + 1, except k = 0 if i = 4) overflow or underflow
TAiS bit is set to "0" (stop counting)
PWM pulse goes "L"
I/O port or trigger input
Pulse output
An indeterminate value is read by reading TAi register
• When not counting and until the 1st count source is input after counting start
Value written to TAi register is written to both reload register and counter
• When counting (after 1st count source input)
Value written to TAi register is written to only reload register
(Transferred to counter when reloaded next)
Specification
n : set value of TAi register
fj: count source frequency (f
n : set value of TAiMR register high-order address
pin
IN
Timer A
, f
, f
, f
, f
)
1
2
8
32
C32

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents