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.

Table 27-17. Auto-Shutdown and Gating Sources
ASDG[7:0]Auto-Shutdown/Gating Source
1xxx xxxxOCFB
x1xx xxxxOCFA
xx1x xxxxCLC1
xxx1 xxxxICMn
xxxx 1xxxOCFD
xxxx x1xxOCFC
xxxx xx1xComparator 2 Output
xxxx xxx1Comparator 1 Output