English
Language : 

PIC16LF1503 Datasheet, PDF (218/340 Pages) Microchip Technology – 14-Pin Flash, 8-Bit Microcontrollers
PIC16(L)F1503
22.0 PULSE WIDTH MODULATION
(PWM) MODULE
The PWM module generates a Pulse-Width Modulated
signal determined by the duty cycle, period, and reso-
lution that are configured by the following registers:
• PR2
• T2CON
• PWMxDCH
• PWMxDCL
• PWMxCON
Figure 22-2 shows a simplified block diagram of PWM
operation.
Figure 22-1 shows a typical waveform of the PWM
signal.
For a step-by-step procedure on how to set up this
module for PWM operation, refer to Section 22.1.9
“Setup for PWM Operation using PWMx Pins”.
FIGURE 22-1:
Period
PWM OUTPUT
Pulse Width
TMR2 = 0
TMR2 = PR2
TMR2 =
PWMxDCH<7:0>:PWMxDCL<7:6>
FIGURE 22-2:
SIMPLIFIED PWM BLOCK DIAGRAM
Duty Cycle registers
PWMxDCH
Latched
(Not visible to user)
Comparator
TMR2 Module
TMR2
(1)
PWMxDCL<7:6>
RQ
0
SQ
1
PWMxOUT
to other peripherals: CLC and CWG
Output Enable (PWMxOE)
TRIS Control
PWMx
Output Polarity (PWMxPOL)
Comparator
PR2
Clear Timer,
PWMx pin and
latch Duty Cycle
Note 1: 8-bit timer is concatenated with the two Least Significant bits of 1/FOSC adjusted by
the Timer2 prescaler to create a 10-bit time base.
DS41607A-page 218
Preliminary
 2011 Microchip Technology Inc.