The ADC module allows for the ability to generate an interrupt upon completion of an Analog-to-Digital Conversion. The ADC interrupt flag is the ADIF bit in the PIRx register. The ADC interrupt enable is the ADIE bit in the PIEx register. The ADIF bit must be cleared by software.
1
, PEIE =
1
, and GIE = 0
: An interrupt will wake the
device from Sleep. Upon waking from Sleep, the instructions following the
SLEEP
instruction are executed. The Interrupt Service
Routine is not executed.1
, PEIE =
1
, and GIE = 1
: An interrupt will wake the
device from Sleep. Upon waking from Sleep, the instruction following the
SLEEP
instruction is always executed. Then the execution
will switch to the Interrupt Service Routine.