A test program for my high speed analog input class.

Dependencies:   mbed HighSpeedAnalogIn

Files at this revision

API Documentation at this revision

Comitter:
shintamainjp
Date:
Fri Feb 04 22:17:40 2011 +0000
Commit message:
Initial version.

Changed in this revision

HighSpeedAnalogIn.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 29975cf64da2 HighSpeedAnalogIn.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HighSpeedAnalogIn.lib	Fri Feb 04 22:17:40 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/shintamainjp/code/HighSpeedAnalogIn/#db55359719e7
diff -r 000000000000 -r 29975cf64da2 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 04 22:17:40 2011 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "HighSpeedAnalogIn.h"
+
+BusOut chksig(p21, p22, p23, p24, p25, p26);
+HighSpeedAnalogIn ain(p15, p16, p17, p18, p19, p20);
+Ticker ticker;
+volatile int cnt = 0;
+
+void func() {
+    printf("cnt=%d\n", cnt);
+    cnt = 0;
+}
+
+int main() {
+    ticker.attach(&func, 1);
+    while (1) {
+        cnt++;
+        int val1 = ain.read(p15);
+        int val2 = ain.read(p16);
+        int val3 = ain.read(p17);
+        int val4 = ain.read(p18);
+        int val5 = ain.read(p19);
+        int val6 = ain.read(p20);
+        chksig = chksig + 1;
+    }
+}
diff -r 000000000000 -r 29975cf64da2 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Feb 04 22:17:40 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e