33.4.1 Initialization
To initialize and run the ADC in basic single-ended mode, follow these steps:
- Configure the Timebase bit field in the Control B register (CTRLB.TIMEBASE).
- Configure the Reference Selection bit field in the Control C register (CTRLC.REFSEL).
- Configure a positive input by writing to the Positive Input Multiplexer bit field in the Input Multiplexer Control register (INPUTCTRL.MUXPOS).
- Configure the mode of operation for the ADC by writing to the Differential Mode bit and the Mode bit field in the Command register (COMMAND.DIFF and COMMAND.MODE).
- Enable the ADC by writing a
‘
1’ to the Enable bit in the Control A register (CTRLA.ENABLE). - Configure how an ADC conversion will start by writing to the Start Conversion bit field in the Command register (COMMAND.START).
