30.3.1 Initialization

Follow these steps for basic operation:
  1. Configure the desired input pins as analog inputs. Refer to the PORT - I/O Pin Configuration section for more details.
  2. Select the positive and negative input sources by writing to the Positive and Negative Input MUX Selection (MUXPOS and MUXNEG) bit fields in the MUX Control (ACn.MUXCTRL) register.
  3. Optional: Select the desired mode by writing to the Operation Select (OPSEL) bit fields in the Control A (ACn.CTRLA) register. If Event Triggered mode is selected, configure the desired event source for ACn. Refer to the EVSYS - Event System section for more details.
  4. Optional: Enable the output to pin by writing a ‘1’ to the Output Enable (OUTEN) bit in the Control B (ACn.CTRLB) register.
  5. Enable the AC by writing a ‘1’ to the ENABLE bit in ACn.CTRLA.
Note: The OUT pin must be configured as an output to avoid the pin being tri-stated when the AC is disabled.

During the start-up time after enabling the AC, the INITVAL bit in the Control B (ACn.CTRLB) register determines the initial state of the AC output before the AC is ready. For details about the start-up time of the AC, refer to the Electrical Characteristics section.