27.4.4.4.4 Auto-Shutdown Control
The primary function of the auto-shutdown control logic is to place the module output pins in a safe state when driving external power circuitry. The auto-shutdown function can also be used to place the output pins of the CCP module in a specific state based on an external event.
Auto-shutdown control is implemented as part of the time base gating (see Gating Logic). The user must select an input source for the auto-shutdown using the ASDG[7:0] control bits (CCPxCON2[7:0]). The available sources for auto-shutdown are device-dependent and typically include such sources as comparator outputs, I/O pins, software control (i.e., the SSDG bit) and so on. With the exception of the SSDG control bit, which is active-high, a low output from the shutdown source places the module OCA pins in the shutdown state. The auto-shutdown event is level-sensitive, not edge-triggered. The comparator output and other shutdown sources are not synchronized to the system clocks to provide an immediate response of the CCP module to the shutdown input signal.
When a shutdown occurs, the selected output states are placed onto the module port pins.
ASDG[7:0] | Auto-Shutdown/Gating Source |
---|---|
1xxx xxxx | OCFB |
x1xx xxxx | OCFA |
xx1x xxxx | CLC1 |
xxx1 xxxx | ICMn |
xxxx 1xxx | OCFD |
xxxx x1xx | OCFC |
xxxx xx1x | Comparator 2 Output |
xxxx xxx1 | Comparator 1 Output |