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