![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Example description
The CMP example demonstrates using the analog comparator.
This example configures the positive voltage input as the voltage found on PIN0.25, which is trimmed through the potentiometer. Adjust the POT up and down to adjust the voltage into the analog comparator. When the voltage crosses the negative voltage input, a CMP IRQ is fired. Based on which side of the voltage is in reference to the bandgap, the LED state will change.
Special connection requirements
Connect P0.25 (J5.24) to P1.7 (J5.29) to input the comparator 0
Build procedures:
LPC17xx/40xx example quickstart for Keil uVision4
LPC17xx/40xx example quickstart for IAR EWARM
LPC17xx/40xx example quickstart for Code Red Xpresso
Supported boards and board setup:
Embedded Artists' LPC4088 Developer's Kit
Submitting LPCOpen issues:
Community support for LPCOpen
Macros | |
| #define | CMP_ID 1 |
Functions | |
| int | main (void) |
| Main UART program body. | |