Microchip Technology ARD00385 数据表
2009-2011 Microchip Technology Inc.
DS39957D-page 265
PIC18F87K90 FAMILY
When a shutdown event occurs, two things happen:
• The ECCPxASE bit is set to ‘1’. The ECCPxASE
• The ECCPxASE bit is set to ‘1’. The ECCPxASE
will remain set until cleared in firmware or an
auto-restart occurs. (See
auto-restart occurs. (See
.)
• 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
(ECCPxAS<3:2> and <1:0>, respectively).
pins are grouped into pairs: PxA/PxC and
PxB/PxD. The state of each pin pair is determined
by the PSSxAC and PSSxBD bits
(ECCPxAS<3:2> and <1:0>, respectively).
Each pin pair may be placed into one of three states:
• Drive logic ‘1’
• Drive logic ‘0’
• Tri-state (high-impedance)
• Drive logic ‘1’
• Drive logic ‘0’
• Tri-state (high-impedance)
REGISTER 19-3:
ECCPxAS: ECCPx AUTO-SHUTDOWN CONTROL REGISTER
R/W-0
R/W-0
R/W-0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
ECCPxASE
ECCPxAS2
ECCPxAS1
ECCPxAS0
PSSxAC1
PSSxAC0
PSSxBD1
PSSxBD0
bit 7
bit 0
Legend:
R = Readable bit
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7
ECCPxASE:
ECCP Auto-Shutdown Event Status bit
1
= A shutdown event has occurred; ECCP outputs are in a shutdown state
0
= ECCP outputs are operating
bit 6-4
ECCPxAS<2:0>:
ECCP Auto-Shutdown Source Select bits
000
= Auto-shutdown is disabled
001
= Comparator C1OUT output is high
010
= Comparator C2OUT output is high
011
= Either Comparator C1OUT or C2OUT is high
100
= V
IL
on FLT0 pin
101
= V
IL
on FLT0 pin or Comparator C1OUT output is high
110
= V
IL
on FLT0 pin or Comparator C2OUT output is high
111
= V
IL
on FLT0 pin, Comparator C1OUT or Comparator C2OUT is high
bit 3-2
PSSxAC<1:0>:
Pins PxA and PxC Shutdown State Control bits
00
= Drive the PxA and PxC pins to ‘0’
01
= Drive the PxA and PxC pins to ‘1’
1x
= PxA and PxC pins tri-state
bit 1-0
PSSxBD<1:0>:
Pins PxB and PxD Shutdown State Control bits
00
= Drive the PxB and PxD pins to ‘0’
01
= Drive the PxB and PxD pins to ‘1’
1x
= PxB and PxD pins tri-state
Note:
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.
Writing to the ECCPxASE bit is disabled while an auto-shutdown condition persists. 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.
present, the auto-shutdown will persist.
Writing to the ECCPxASE bit is disabled while an auto-shutdown condition persists. 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.