English
Language : 

PIC16F193X Datasheet, PDF (197/418 Pages) Microchip Technology – 28/40/44-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology
PIC16F193X/LF193X
19.6 PWM (Enhanced Mode)
The Enhanced PWM mode can generate a PWM signal
on up to four different output pins with up to 10-bits of
resolution. It can do this through four different PWM
output modes:
• Single PWM
• Half-Bridge PWM
• Full-Bridge PWM, Forward mode
• Full-Bridge PWM, Reverse mode
To select an Enhanced PWM mode, the P1M bits of the
CCP1CON register must be set appropriately.
Note:
The PWM Enhanced mode is available on
the Enhanced Capture/Compare/PWM
module (CCP1) only.
The PWM outputs are multiplexed with I/O pins and are
designated P1A, P1B, P1C and P1D. The polarity of the
PWM pins is configurable and is selected by setting the
CCP1M bits in the CCP1CON register appropriately.
Table 19-7 shows the pin assignments for each
Enhanced PWM mode.
Figure 19-5 shows an example of a simplified block
diagram of the Enhanced PWM module.
Note:
To prevent the generation of an
incomplete waveform when the PWM is
first enabled, the ECCP module waits until
the start of a new PWM period before
generating a PWM signal.
FIGURE 19-5:
EXAMPLE SIMPLIFIED BLOCK DIAGRAM OF THE ENHANCED PWM MODE
Duty Cycle Registers
CCPRxL
DCxB<1:0>
CCPRxH (Slave)
Comparator
R
TMRx
(1)
S
Comparator
PRx
Clear Timerx,
toggle PWM pin and
latch duty cycle
PxM<1:0>
CCPxM<3:0>
2
4
CCPx/P1A
TRISx
P1B
Q
Output
TRISx
Controller
P1C
TRISx
P1D
PWMxCON
TRISx
CCPx/P1A
P1B
P1C
P1D
Note 1: The 8-bit timer TMRx register is concatenated with the 2-bit internal Q clock, or 2 bits of the prescaler to create the 10-bit
time base.
Note 1: The TRIS register value for each PWM output must be configured appropriately.
2: Clearing the CCPxCON register will relinquish ECCP control of all PWM output pins.
3: Any pin not used by an Enhanced PWM mode is available for alternate pin functions.
TABLE 19-7: EXAMPLE PIN ASSIGNMENTS FOR VARIOUS PWM ENHANCED MODES
ECCP Mode
PxM<1:0>
CCPx/P1A
P1B
P1C
P1D
Single
00
Yes(1)
Half-Bridge
10
Yes
Full-Bridge, Forward
01
Yes
Full-Bridge, Reverse
11
Yes
Note 1: Pulse Steering enables outputs in Single mode.
Yes(1)
Yes
Yes
Yes
Yes(1)
No
Yes
Yes
Yes(1)
No
Yes
Yes
© 2008 Microchip Technology Inc.
Preliminary
DS41364A-page 195