41.3.3.6 Input and Reference Selection
The input selection to 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 input and reference selections while a conversion is ongoing will corrupt the output. Reading the ADC Busy (ADCBUSY) bit in the Status (ADCn.STATUS) register can detect an ongoing conversion. Writing STOP to the Start Conversion (START) bit field in the Command (ADCn.COMMAND) register will stop an ongoing conversion.
After switching input or reference, the ADC requires time to settle. Refer to the Electrical Characteristics section for further details.