ACMPEMLIB

Detailed Description

Analog comparator (ACMP) Peripheral API.

The Analog Comparator is used to compare voltage of two analog inputs with a digital output indicating which input voltage is higher. Inputs can either be one of the selectable internal references or from external pins. Response time and current consumption can be configured by altering the current supply to the comparator.

ACMP is available to EM3 and is able to wake up the system when input signals pass a certain threshold. Use ACMP_IntEnable to enable an edge interrupt to use this functionality.

This example shows how to use the em_acmp.h API for comparing an input pin to an internal 2.5 V reference voltage.

ACMP also contains specialized hardware for capacitive sensing. This module contains the ACMP_CapsenseInit function to initialize ACMP for capacitive sensing and the ACMP_CapsenseChannelSet function to select the current capsense channel.

For applications that require capacitive sensing it is recommended to use a library, such as cslib, which is provided by Silicon Labs.

This module contains functions to control the ACMP peripheral of Silicon Labs 32-bit MCUs and SoCs.

This function sets up ACMP for use in capacitive sense applications. To use the capacitive sense functionality in the ACMP, use the PRS output of the ACMP module to count the number of oscillations in the capacitive sense circuit (possibly using a TIMER).

Note

A basic example of capacitive sensing can be found in the STK BSP (capsense demo).

Parameters

[in]

acmp

A pointer to the ACMP peripheral register block.

[in]

init

A pointer to the initialization structure used to configure ACMP for capacitive sensing operation.

This is used when an external module needs to take control of the ACMP POSSEL field to configure the APORT input for the ACMP. Modules, such as LESENSE, use this to change the ACMP input during a scan sequence.

Parameters

[in]

acmp

A pointer to the ACMP peripheral register block.

[in]

aport

This parameter decides which APORT(s) the ACMP will use when it's controlled by an external module.