Datasheet

PIC12F752/HV752
DS41576B-page 92 Preliminary 2011 Microchip Technology Inc.
11.8 Auto-shutdown Control
Auto-shutdown is a method to immediately override
the COG output levels with specific overrides that
allow for safe shutdown of the circuit.
The shutdown state can be either cleared automati-
cally or held until cleared by software.
11.8.1 SHUTDOWN
The shutdown state can be entered by either of the
following two mechanisms:
Software generated
External Input
11.8.1.1 Software Generated Shutdown
Setting the GxASDE bit of the COGxASD register will
force the COG into the shutdown state.
When auto-restart is disabled, the shutdown state will
persist as long as the GxASDE bit is set.
When auto-restart is enabled, the GxASDE bit will
clear automatically and resume operation on the next
rising event. See Figure 11-5.
11.8.1.2 External Shutdown Source
External shutdown inputs provide the fastest way to
safely suspend COG operation in the event of a fault
condition. When any of the selected shutdown inputs
goes true, the output drive latches are reset and the
COG outputs will immediately go to the selected over-
ride levels without software delay.
Any combination of four input sources can be selected
to cause a shutdown condition. The four sources
include:
HLTimer1 output
C2OUT (low true)
C1OUT (low true)
COG1FLT pin (low true)
Shutdown inputs are selected independently with bits
<3:0> of the COGxASD register (Register 11-3).
11.8.2 PIN OVERRIDE LEVELS
The levels driven to the output pins, while the shut-
down input is true, are controlled by the GxASDL0 and
GxASDL1 bits of the COGxASD register
(Register 11-3). GxASDL0 controls the GxOUT0 over-
ride level and GxASDL1 controls the GxOUT1 over-
ride level. The control bit logic level corresponds to the
output logic drive level while in the shutdown state.
11.8.3 AUTO-SHUTDOWN RESTART
After an auto-shutdown event has occurred, there are
two ways to have the module resume operation:
Software controlled
Auto-restart
The restart method is selected with the GxARSEN bit
of the COGxASD register. Waveforms of a software
controlled automatic restart are shown in Figure 11-5.
11.8.3.1 Software Controlled Restart
When the GxARSEN bit of the COGxASD register is
cleared, the COG must be restarted after an
auto-shutdown event by software.
The COG will resume operation on the first rising
event after the GxASDE bit is cleared. Clearing the
shutdown state requires all selected shutdown inputs
to be false, otherwise, the GxASDE bit will remain set.
11.8.3.2 Auto-Restart
When the GxARSEN bit of the COGxASD register is
set then the COG will restart from the auto-shutdown
state automatically.
The GxASDE bit will clear automatically and the COG
will resume operation on the first rising event after all
selected shutdown inputs go false.
Note: Shutdown inputs are level sensitive, not
edge sensitive. The shutdown state cannot
be cleared as long as the shutdown input
level persists, except by disabling
auto-shutdown,
Note: The polarity control does not apply to the
override level.