MB91360G Series
97
8.
PWM TIMER
The PWM (Pulse Width Modulation) timer can output high-precision pulse waves at an arbitrary cycle and pulse
width (duty ratio) .
The MB91360G series contains eight PWM timer channels. Each of the channels consists of a 16-bit down-
counter, cycle setting register, duty setting register, and pin controller.
The control status register for each channel is used to indicate the operation status of the PWM timer. General
control registers 1 and 2 are common registers shared by four channels, serving for input and software triggering.
(1) Features
The count clock for the 16-bit down-counter can be selected from among the following four types :
Internal clocks :
φ
,
φ
/4,
φ
/16,
φ
/64 (
φ
: Machine clock for peripherals)
The counter can be initialized to “FFFF
H
” by a reset or underflow.
The 16-bit down-counter causes an underflow when it changes from “0000
H
” to “FFFF
H
”.
Each channel has PWM outputs.
Eight channels : Eight output pins
Registers
Cycle setting register : Data reload register with buffer
Data transfer from the buffer is performed either when an activation trigger is detected or when
the down-counter causes an underflow (cycle match) . The output is inverted at a cycle match.
Duty setting register : Compare register with buffer.
The value set in this register is compared to the counter value. The output is inverted when the values
match (duty match) .
Pin control
A duty match causes a reset to “1” (given priority) .
An underflow causes a reset to “0”.
The output value fix mode enables output of all “L” or all “H”.
The polarity can also be specified.
Interrupt requests can be generated by selecting the following interrupt sources :
Activation of the PWM timer (software trigger or trigger input)
Occurrence of an underflow (cycle match)
Occurrence of a duty match
Occurrence of an underflow (cycle match) or duty match
You can set simultaneous activation of two or more channels using software or another interval timer. You can
also set restarting the PWM timer during operation.