PIC18F2331/2431/4331/4431
FIGURE 18-4:
PWM TIME BASE BLOCK DIAGRAM
PTMR Register
PTMR Clock
Timer Reset
Up/Down
Zero Match
Comparator
Timer
Direction
Control
PTDIR
Period Match
PTMOD1
Comparator
PTPER
Duty Cycle Load
Period Load
PTPER Buffer
Update Disable (UDIS)
Zero Match
Period Match
PTMOD1
Clock
Control
PTMR Clock
PTEN
PTMOD0
Prescaler
1:1, 1:4, 1:16, 1:64
FOSC/4
Zero Match
Postscaler
1:1-1:16
Interrupt
Control
PTIF
Period Match
PTMOD1
PTMOD0
The PWM time base can be configured for four different
modes of operation:
These four modes are selected by the PTMOD<1:0>
bits in the PTCON0 register. The Free-Running mode
produces edge-aligned PWM generation. The
Continuous Up/Down Count modes produce
center-aligned PWM generation. The Single-Shot
mode allows the PWM module to support pulse control
of certain Electronically Commutated Motors (ECMs)
and produces edge-aligned operation.
• Free-Running mode
• Single-Shot mode
• Continuous Up/Down Count mode
• Continuous Up/Down Count mode with interrupts
for double updates
2010 Microchip Technology Inc.
DS39616D-page 177