36.4.1 Initialization

For basic operation, follow these steps:
  1. Configure the positive and negative input sources of COMPn by writing to the Positive and Negative Input Selection bit fields in the Comparator n Comparator Control A register (COMP[n].COMPCTRLA.MUXPOS/MUXNEG).
  2. Enable COMPn by writing a ‘1’ to the Comparator Enable bit in the Comparator n Comparator Control A register (COMP[n].COMPCTRLA.ENABLE).
  3. Enable the AC by writing a ‘1’ to the Global Enable bit in the Control A register (CTRLA.ENABLE).