36.5 ADC Module Configuration

Operation of the ADC module is directed through bit settings in the specific registers. The following instructions summarize the actions and the settings. The options and details for each configuration step are provided in the subsequent sections.

To configure the ADC module, perform the following steps:
  1. Configure the analog port pins as described in 36.5.1 Configuring the Analog Port Pins.
  2. Select the analog inputs to the ADC multiplexers as described in 36.5.2 Selecting the ADC Multiplexer Analog Inputs.
  3. Select the format of the ADC result as described in 36.5.3 Selecting the Format of the ADC Result.
  4. Select the conversion trigger source as described in 36.5.4 Selecting the Conversion Trigger Source.
  5. Select the voltage reference source as described in 36.5.5 Selecting the Voltage Reference Source.
  6. Select the scanned inputs as described in 36.5.6 Selecting the Scanned Inputs.
  7. Select the ADC clock source and prescaler as described in 36.5.7 Selecting the Analog-to-Digital Conversion Clock Source and Prescaler.
  8. Specify any additional acquisition time (if required) as described in 36.5.7 Selecting the Analog-to-Digital Conversion Clock Source and Prescaler.
  9. Turn on the ADC module as described in 36.5.8 Turning ON the ADC.
  10. Poll (or wait for the interrupt) for the voltage reference to be ready as described in 36.5.5 Selecting the Voltage Reference Source.
  11. Enable the analog and bias circuit for the required ADC modules and, after the ADC module wakes up, enable the digital circuit as described in 36.8.3 Low-Power Mode.
  12. Configure the ADC interrupts (if required) as described in 36.7 Interrupts.