|
PIC16F1946 Datasheet, PDF (225/440 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt XLP Technology | |||
|
◁ |
PIC16F/LF1946/47
FIGURE 22-13:
EXAMPLE OF PWM DIRECTION CHANGE AT NEAR 100% DUTY CYCLE
Forward Period
t1
Reverse Period
PxA
PxB
PxC
PxD
PW
External Switch C
External Switch D
Potential
Shoot-Through Current
PW
TON
TOFF
T = TOFF â TON
Note 1: All signals are shown as active-high.
2: TON is the turn on delay of power switch QC and its driver.
3: TOFF is the turn off delay of power switch QD and its driver.
22.4.3 ENHANCED PWM
AUTO-SHUTDOWN MODE
The PWM mode supports an Auto-Shutdown mode that
will disable the PWM outputs when an external
shutdown event occurs. Auto-Shutdown mode places
the PWM output pins into a predetermined state. This
mode is used to help prevent the PWM from damaging
the application.
The auto-shutdown sources are selected using the
CCPxAS<2:0> bits of the CCPxAS register. A shutdown
event may be generated by:
⢠A logic â0â on the INT pin
⢠A logic â1â on a Comparator (Cx) output
A shutdown condition is indicated by the CCPxASE
(Auto-Shutdown Event Status) bit of the CCPxAS
register. If the bit is a â0â, the PWM pins are operating
normally. If the bit is a â1â, the PWM outputs are in the
shutdown state.
When a shutdown event occurs, two things happen:
The CCPxASE bit is set to â1â. The CCPxASE will
remain set until cleared in firmware or an auto-restart
occurs (see Section 22.4.4 âAuto-Restart Modeâ).
The enabled PWM pins are asynchronously placed in
their shutdown states. The PWM output pins are
grouped into pairs [PxA/PxC] and [PxB/PxD]. The state
of each pin pair is determined by the PSSxAC and
PSSxBD bits of the CCPxAS register. Each pin pair may
be placed into one of three states:
⢠Drive logic â1â
⢠Drive logic â0â
⢠Tri-state (high-impedance)
Note 1: The auto-shutdown condition is a
level-based signal, not an edge-based
signal. As long as the level is present, the
auto-shutdown will persist.
2: Writing to the CCPxASE bit is disabled
while an auto-shutdown condition
persists.
3: Once the auto-shutdown condition has
been removed and the PWM restarted
(either through firmware or auto-restart)
the PWM signal will always restart at the
beginning of the next PWM period.
4: Prior to an auto-shutdown event caused
by a comparator output or INT pin event,
a software shutdown can be triggered in
firmware by setting the CCPxASE bit to a
â1â. The auto-restart feature tracks the
active status of a shutdown caused by a
comparator output or INT pin event only,
so if it is enabled at this time, it will imme-
diately clear this bit and restart the ECCP
module at the beginning of the next PWM
period.
ï£ 2010 Microchip Technology Inc.
Preliminary
DS41414A-page 223
|
▷ |