31.3.3.6 Input and Reference Selection
The input selection for the ADC is controlled by the Positive Input Multiplexer (ADCn.MUXPOS) register.
The reference voltage for the ADC (VREF) controls the conversion range of the ADC. VREF can be selected by writing the Reference Selection (REFSEL) bit field in the Control C (ADCn.CTRLC) register. Except for VDD, the internal reference voltages are generated from an internal band gap reference.
Changing the input or reference selections while a conversion is ongoing will corrupt the output. An ongoing conversion can be detected by reading the ADC Busy (ADCBUSY) bit in the Status (ADCn.STATUS) register. Writing STOP to the Start Conversion (START) bit field in the Command (ADCn.COMMAND) register will stop an ongoing conversion.
After switching the input or reference, the ADC requires time to settle. Refer to the Electrical Characteristics section for further details.
