CoX Peripheral Interface V2.1
API Reference
ACMP

Analog Comparators (ACMP) Peripheral Driver. More...

Collaboration diagram for ACMP:

Modules

 xACMP
 

CoX ACMP Peripheral Interface.



Detailed Description

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.


Contents


1. ACMP Physical Block

comp_block.png


2. ACMP Functional Description


2.1 ACMP Peripheral Pin Description

//! +----------------+------------------------------------------------+
//! |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.                 |
//! +----------------+------------------------------------------------+
//! 

2.2 ACMP Analog Input Source

The ACMP- input can be:

The ACMP+ input can be:

2.3 ACMP Output

CoX defines the comparator output(Cno):

2.4 ACMP Interrupt and Event

CoX defines the comparator interrupt: only when the Cno output changed, the moudle generates an interrupt.


Note:
Here describes the common function of the ACMP Peripheral. The CoX Peripheral Interface is base on the functions above.