The comparator peripheral (COMP) compares one input voltage (VIN+) against another input voltage (VIN-). VIN+ can be derived from an analog input pin (AIN0 to AIN7). VIN- can be derived from multiple sources depending on the operation mode of the comparator.
The main features of COMP are the following:
- Input range from 0 V to VDD
- Single-ended mode
- Fully flexible hysteresis using a 64-level reference ladder
- Differential mode
- Configurable hysteresis
- Reference inputs (VREF)
- External reference from AIN0 to AIN7 (between 0 V and VDD)
- Internal VDD reference
- 1.2 V internal reference
- Two speed/power consumption modes, low-power and high-speed
- Single-pin capacitive sensor support
- Event generation on output changes
- UP event when VIN+ rises above VIN- (VIN+ > VIN-)
- DOWN event when VIN+ falls below VIN- (VIN+ < VIN-)
- CROSS event on VIN+ and VIN- crossing
- READY event on core and internal reference (if used) ready