Task: Use of ADC noise reduction sleep.
In this program, the initialize() routine is used to initialize the ADC module. The example uses ADC noise reduction sleep mode. Enter the sleep mode by executing 'sleep' instruction. The ADC will start a conversion after the CPU has been halted. As the ADC conversion complete interrupt is enabled, the Interrupt Service Routine for this interrupt will be triggered as soon as the conversion is completed. ADSC bit remains high during a conversion. When the execution of ISR is finished, the execution comes to the main routine and it executes 'sleep' again, which triggers another conversion.
Test Steps
Refer to Test Steps.