lpcmp_interrupt

Overview

The LPCMP interrupt Example shows how to use interrupt with LPCMP driver.

In this example, user should indicate an input channel to capture a voltage signal (can be controlled by user) as the LPCMP’s positive channel input. On the negative side, the internal DAC is used to generate the fixed voltage about half value of reference voltage.

When running the project, change the input voltage of user-defined channel, then the comparator’s output would change between logic one and zero when the user-defined channel’s voltage crosses the internal DAC’s value. The change of comparator’s output would generate the falling and rising edge events with their interrupts enabled. When any LPCMP interrupt happens, the LPCMP’s ISR would turn on the LED light if detecting the output’s rising edge, or turn off it when detecting the output’s falling edge.

Supported Boards