Pulse Width Modulation (Pwm) Mode - Renesas M16C/6NK Hardware Manual

16-bit single-chip microcomputer m16c family / m16c/60 series
Table of Contents

Advertisement

Under development
This document is under development and its contents are subject to change.
M16C/6N Group (M16C/6NK, M16C/6NM)

13.1.4 Pulse Width Modulation (PWM) Mode

In pulse width modulation 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 13.5 lists specifications in pulse width modulation mode. Figure 13.12 shows TAiMR register in
pulse width modulation mode.
Figures 13.13 and 13.14 show examples of how a 16-bit pulse width modulator operates and how an 8-bit
pulse width modulator operates, respectively.
Table 13.5 Specifications in Pulse Width Modulation Mode
Item
Count Source
Count Operation
16-bit PWM
8-bit PWM
Count Start Condition
Count Stop Condition
Interrupt Request Generation Timing On the falling edge of the PWM pulse
TAiIN Pin Function
TAiOUT Pin Function
Read from Timer
Write to Timer
i = 0 to 4
j = i - 1, except j = 4 if i = 0
k = i + 1, except k = 0 if i = 4
Rev.2.00
Nov 28, 2005
REJ09B0124-0200
f1, f2, f8, f32, fC32
• 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 fj : count source frequency (f1, f2, f8, f32, fC32)
• High level width n ✕ (m+1) / fj n : set value of the TAi register high-order address
-1) ✕ (m+1) / fj m : set value of the TAi register low-order address
8
• Cycle time (2
• The TAiS bit in the TABSR register is set to "1" (start counting)
• The TAiS bit = 1 and external trigger input from the TAiIN pin
• The TAiS bit = 1 and one of the following external triggers occurs
Timer B2 overflow or underflow,
Timer Aj overflow or underflow,
Timer Ak overflow or underflow
The TAiS bit is set to "0" (stop counting)
I/O port or trigger input
Pulse output
An indeterminate value is read by reading the TAi register
• When not counting and until the 1st count source is input after counting start
Value written to the TAi register is written to both reload register and counter
• When counting (after 1st count source input)
Value written to the TAi register is written to only reload register
(Transferred to counter when reloaded next)
page 127 of 378
Specification
n : set value of the TAi register
13. Timers

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6nm

Table of Contents