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 and GIE = 0 : An interrupt will
wake-up the device from Sleep. Upon waking from Sleep, the instructions
following the SLEEP instruction
is executed. Interrupt Service Routine is not executed.1 and GIE = 1 : An interrupt will
wake-up 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.