LPC8xx Internal Analog Comparator

Dependencies:   ACMP mbed

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Mon Nov 16 03:46:41 2015 +0000
Commit message:
1st build

Changed in this revision

ACMP.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 658eb934ee88 ACMP.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ACMP.lib	Mon Nov 16 03:46:41 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/okini3939/code/ACMP/#6ad2528ba3cc
diff -r 000000000000 -r 658eb934ee88 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Nov 16 03:46:41 2015 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "ACMP.h"
+
+DigitalOut led1(LED1), led2(LED2);
+ACMP acmp(ACMP::ACMP_I1, ACMP::LADDER, ACMP::HYS5mV, 16);
+
+/*
+void isr_rise () {
+    led2 = 1;
+}
+void isr_fall () {
+    led2 = 0;
+}
+*/
+
+int main() {
+/*
+    acmp.rise(&isr_rise);
+    acmp.fall(&isr_fall);
+*/
+    while(1) {
+        led1 = !led1;
+        led2 = acmp.read();
+        wait(0.2);
+    }
+}
diff -r 000000000000 -r 658eb934ee88 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Nov 16 03:46:41 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file