38.3 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 Configuring the Analog Port Pins.
  2. Select the analog inputs to the ADC multiplexers as described in Selecting the ADC Multiplexer Analog Inputs.
  3. Select the format of the ADC result as described in Selecting the Format of the ADC Result.
  4. Select the conversion trigger source as described in Selecting the Conversion Trigger Source.
  5. Select the voltage reference source as described in Selecting the Voltage Reference Source.
  6. Select the scanned inputs as described in Selecting the Scanned Inputs.
  7. Select the analog-to-digital conversion clock source and prescaler as described in Selecting the Analog-to-Digital Conversion Clock Source and Prescaler.
  8. Specify any additional acquisition time (if required) as described in ADC Sampling Requirements.
  9. Turn on the ADC module as described in Turning ON the ADC.
  10. Poll (or wait for the interrupt) for the voltage reference to be ready as described in 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 Low-Power Mode.
  12. Configure the ADC interrupts (if required) as described in Interrupts.