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