36.4.2.3 Comparator Output

The digital output from any comparator (COMPn-OUT) is ‘1’ when the difference between the positive and the negative input voltage is positive, and ‘0’ otherwise. The result of the latest comparison is available in the Comparator n State bit in the Status register (STATUS.COMPSTATEn).

The output of each comparator can be routed to an I/O pin for use by external devices by writing a ‘1’ to the Output Enable bit field in the Comparator n Comparator Control A register (COMP[n].COMPCTRLA.OUT). When enabled, the output appears on the corresponding COMPn-OUT pin.

Note: Before using any I/O pins as comparator output, they must be configured as digital outputs. Refer to I/O Lines for details.