300
CHAPTER 14 PWM TIMER
14.1 Overview of PWM Timer

The PWM timer can efficiently output accurate PWM waveforms.

The MB91F109 contains four channels of PWM timer.

Each channel consists of a 16-bit counter, a 16-bit data register with a cycle setting

buffer, a 16-bit compare register with a duty cycle setting buffer, and a pin controller.

Characteristics of PWM Timer
The co unt clock for the 16-bit counter can be selected from the followi ng four types:
Internal clock: φ, φ/4, φ/16, φ/64
The counter value can b e initialized to "FFFFH" by resetting or a counter borrow.
PWM out put is enabled through each channel.
•Registers
Cycle set ting register: Data register for reloading containing a buffer
Duty cyc le setting register: Compare register containing a buffer
Transfe r from the buffer is triggered by a counter borrow.
•Pin control
The pin i s set to "1" when duty cycles match. (Priority)
The pin i s reset to "0" when a counter borrow occurs.
Because t he constant output level mod e is suppo rted, output can be maintaine d at a low
or high level.
Polar ity specification is enabled.
The follow ing events can be selected as causes for interrupt requests:
PWM ti mer activation
Occurrence of counter borrow (cycle matching)
Occurrence of duty cycle matching
Occurrence of counter borrow (cycle matching) or duty cycle matching
An interrupt request thus caused can start DMA transfer.
Software or ano ther interval timer can activate multip le channels simu ltaneously. Restar ting
during operation is also enabled.