30.2 Overview

The Analog Comparator (AC) compares the voltage levels on two inputs and gives a digital output based on this comparison. The input selection includes analog port pins and internally generated inputs. The AC output can be configured to generate interrupt requests and/or events based on changes in the AC inputs, or it can be made available on the pin for external devices.

A hysteresis feature can adjust the dynamic behavior of the AC. The hysteresis can be customized to optimize the operation for each application.

The AC features a Sampled mode designed for low-power applications, wherein it periodically samples the inputs at a predefined frequency. Additionally, the AC includes an Event Trigger mode that enables input sampling at regular or irregular intervals, depending on the trigger source.