![](/media/cache/profiles/f095cedd23b99f1696fc8caecbcf257e.jpg.50x50_q85.jpg)
LPC8xx Internal Analog Comparator
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "ACMP.h" 00003 00004 DigitalOut led1(LED1), led2(LED2); 00005 ACMP acmp(ACMP::ACMP_I1, ACMP::LADDER, ACMP::HYS5mV, 16); 00006 00007 /* 00008 void isr_rise () { 00009 led2 = 1; 00010 } 00011 void isr_fall () { 00012 led2 = 0; 00013 } 00014 */ 00015 00016 int main() { 00017 /* 00018 acmp.rise(&isr_rise); 00019 acmp.fall(&isr_fall); 00020 */ 00021 while(1) { 00022 led1 = !led1; 00023 led2 = acmp.read(); 00024 wait(0.2); 00025 } 00026 }
Generated on Tue Jul 19 2022 07:30:05 by
![doxygen](doxygen.png)