In differential mode, the reference input VIN- is derived directly from one of the AINx pins.
Before enabling the comparator via the ENABLE register, the following registers must be configured for the differential mode:
Note: Depending on the device, not all the analog inputs may be available for each
MUX. See definitions for PSEL and EXTREFSEL for more information about which analog pins are available on a particular
device.
When the HYST register is turned on during this mode, the output of the comparator and associated events do the following:
- Change from ABOVE to BELOW when VIN+ drops below VIN- - (VDIFFHYST/2)
- Change from BELOW to ABOVE when VIN+ raises above VIN- + (VDIFFHYST/2)
This behavior is illustrated in the following figure.