Suga koubou
/
ACMP_sample
LPC8xx Internal Analog Comparator
Revision 0:658eb934ee88, committed 2015-11-16
- Comitter:
- okini3939
- Date:
- Mon Nov 16 03:46:41 2015 +0000
- Commit message:
- 1st build
Changed in this revision
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