English
Language : 

PIC16LF18854 Datasheet, PDF (283/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
19.0 PULSE-WIDTH MODULATION
(PWM)
The PWMx modules generate Pulse-Width Modulated
(PWM) signals of varying frequency and duty cycle.
In addition to the CCP modules, the
PIC16(L)F18855/75 devices contain two PWM mod-
ules (PWM6 and PWM7). These modules are essen-
tially the same as the CCP modules without the
Capture or Compare functionality.
Note:
The PWM6 and PWM7 modules are two
instances of the same PWM module
design. Throughout this section, the lower
case ‘x’ in register and bit names is a
generic reference to the PWM module
number (which should be substituted with
6 or 7 during code development). For
example, the control register is generically
described in this chapter as PWMxCON,
but the actual device registers are
PWM6CON and PWM7CON. Similarly,
the PWMxEN bit represents the PWM6EN
and PWM7EN bits.
Pulse-Width Modulation (PWM) is a scheme that
provides power to a load by switching quickly between
fully on and fully off states. The PWM signal resembles
a square wave where the high portion of the signal is
considered the ‘on’ state (pulse width), and the low
portion of the signal is considered the ‘off’ state. The
term duty cycle describes the proportion of the ‘on’ time
to the ‘off’ time and is expressed in percentages, where
0% is fully off and 100% is fully on. A lower duty cycle
corresponds to less power applied and a higher duty
cycle corresponds to more power applied. The PWM
period is defined as the duration of one complete cycle
or the total amount of on and off time combined.
PWM resolution defines the maximum number of steps
that can be present in a single PWM period. A higher
resolution allows for more precise control of the pulse
width time and, in turn, the power that is applied to the
load.
Figure 19-1 shows a typical waveform of the PWM
signal.
FIGURE 19-1:
PWM OUTPUT
Q1 Q2 Q3 Q4
Rev. 10-000023C
8/26/2015
FOSC
PWM
Pulse Width
TMRx
=
(1)
0
TMRx = PWMxDC(1)
TMRx = PRx(1)
Note 1: Timer dependent on PWMTMRS register settings.
 2016 Microchip Technology Inc.
Preliminary
DS40001824A-page 283