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