Analog Comparators (ACMP) Peripheral Driver. More...
|
Modules | |
| xACMP | |
CoX ACMP Peripheral Interface. | |
Analog Comparators (ACMP) Peripheral Driver.
An analog comparator is a peripheral that compares two analog voltages and provides a logical output that signals the comparison result.
CoX defines the comparator output is:
Each comparator can be configured to cause an interrupt when the comparator output value changes.
The comparator can provide its output to a device pin, acting as a replacement for an analog comparator on the board. In addition, the comparator can signal the application via interrupts.
The Analog Comparators (ACMP) API provides a set of functions for dealing with the ACMP.
Functions are provided to configure the ACMP, and handle the interrupt.
//! +----------------+------------------------------------------------+ //! |Pin Name |Pin Description | //! |----------------|------------------------------------------------| //! |CMPnN(Cn-) |Analog Comparator n Negative input Pin. | //! |----------------|------------------------------------------------| //! |CMPnP(Cn+) |Analog Comparator n Positive input Pin. | //! |----------------|------------------------------------------------| //! |CMPnO(Cno) |Analog Comparator n Output Pin. | //! +----------------+------------------------------------------------+ //!
The ACMP- input can be:
The ACMP+ input can be:
CoX defines the comparator output(Cno):
CoX defines the comparator interrupt: only when the Cno output changed, the moudle generates an interrupt.