8-bit PIC® MCU Comparator Register Options

Last modified by Microchip on 2024/01/26 15:45

Each comparator has two control registers: CMxCON0 and CMxCON1.

The CMxCON0 register contains control and status bits for the following:

  • Enable
  • Output selection
  • Output polarity
  • Speed/Power selection
  • Hysteresis enable
  • Output synchronization

The CMxCON1 register contains control bits for the following:

  • Interrupt enable
  • Interrupt edge polarity
  • Positive input channel selection
  • Negative input channel selection

MPLAB® Code Configurator (MCC) makes it easy to set up the comparator features for your specific device. Refer to the data sheet for your device for details on the various options as it can vary slightly from device to device.

cmp1 set