English
Language : 

PIC18F2331 Datasheet, PDF (187/396 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
Zero match
Comparator
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
PTMOD1
PTMOD0
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 up/down counting 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.
Clock
Control
Interrupt
Control
PTMR clock
PTEN
PTIF
 2003 Microchip Technology Inc.
Preliminary
DS39616B-page 185