|
PIC16F631_08 Datasheet, PDF (143/306 Pages) Microchip Technology – 20-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology | |||
|
◁ |
PIC16F631/677/685/687/689/690
11.4.4
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
ECCPASx bits of the ECCPAS register. A shutdown
event may be generated by:
⢠A logic â0â on the INT pin
⢠Comparator C1
⢠Comparator C2
⢠Setting the ECCPASE bit in firmware
A shutdown condition is indicated by the ECCPASE
(Auto-Shutdown Event Status) bit of the ECCPAS
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 ECCPASE bit is set to â1â. The ECCPASE will
remain set until cleared in firmware or an auto-restart
occurs (see Section 11.4.5 âAuto-Restart Modeâ).
The enabled PWM pins are asynchronously placed in
their shutdown states. The PWM output pins are
grouped into pairs [P1A/P1C] and [P1B/P1D]. The state
of each pin pair is determined by the PSSAC and
PSSBD bits of the ECCPAS register. Each pin pair may
be placed into one of three states:
⢠Drive logic â1â
⢠Drive logic â0â
⢠Tri-state (high-impedance)
FIGURE 11-14: AUTO-SHUTDOWN BLOCK DIAGRAM
ECCPAS<2:0>
INT
From Comparator C2
From Comparator C1
111
110
101
100
011
010
001
000
PRSEN
PSSAC<0>
1
P1A_DRV
0
PSSAC<1>
P1A
TRISx
PSSBD<0>
1
P1B_DRV
0
PSSBD<1>
RS
P1B
TRISx
From Data Bus
D Q ECCPASE
Write to ECCPASE
PSSAC<0>
1
P1C_DRV
0
PSSAC<1>
P1C
TRISx
PSSBD<0>
1
P1D_DRV
0
PSSBD<1>
P1D
TRISx
© 2008 Microchip Technology Inc.
DS41262E-page 141
|
▷ |