English
Language : 

PIC18F2331_07 Datasheet, PDF (187/400 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
PIC18F2331/2431/4331/4431
FIGURE 17-4:
PWM TIME BASE BLOCK DIAGRAM
PTMR Register
PTMR Clock
Timer Reset
Up/Down
Comparator
Comparator
Zero Match
Period Match
PTMOD1
Timer
Direction
Control
PTDIR
Duty Cycle Load
PTPER
Period Load
FOSC/4
PTPER Buffer
Update Disable (UDIS)
Prescaler
1:1, 1:4, 1:16, 1:64
Zero Match
Zero Match
Period Match
PTMOD1
PTMOD0
Postscaler
1:1-1:16
Period Match
Clock
Control
Interrupt
Control
PTMOD1
PTMOD0
PTMR Clock
PTEN
PTIF
The PWM time base can be configured for four different
modes of operation:
• Free-Running mode
• Single-Shot mode
• Continuous Up/Down Count mode
• Continuous Up/Down Count mode with interrupts
for double updates
These four modes are selected by the
PTMOD1:PTMOD0 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.
© 2007 Microchip Technology Inc.
Preliminary
DS39616C-page 185