33.4.1 Initialization

To initialize and run the ADC in basic single-ended mode, follow these steps:
  1. Configure the Timebase bit field in the Control B register (CTRLB.TIMEBASE).
  2. Configure the Reference Selection bit field in the Control C register (CTRLC.REFSEL).
  3. Configure a positive input by writing to the Positive Input Multiplexer bit field in the Input Multiplexer Control register (INPUTCTRL.MUXPOS).
  4. 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).
  5. Enable the ADC by writing a ‘1’ to the Enable bit in the Control A register (CTRLA.ENABLE).
  6. Configure how an ADC conversion will start by writing to the Start Conversion bit field in the Command register (COMMAND.START).