AD7606 Library demo

Dependencies:   AD7606 mbed

Revision:
1:ca30c6307824
Parent:
0:f0b559912391
Child:
2:7a0e156f2cc8
--- a/main.cpp	Mon Jan 19 16:57:18 2015 +0000
+++ b/main.cpp	Tue Jan 20 10:59:21 2015 +0000
@@ -7,20 +7,29 @@
  #define CS      PTD0
  #define CONVST  PTD5
  #define BUSY    PTD4
+ #define RESET   ???
+#elif defined(TARGET_K64F)
+ #define MISO    PTD3
+ #define SCLK    PTD1
+ #define CS      PTD0
+ #define CONVST  PTC4
+ #define BUSY    PTA0
+ #define RESET   PTC3
 #endif
 
 
 Serial pc(USBTX, USBRX);
-AD7606 ad7606(MISO, SCLK, CS, CONVST, BUSY, 100000);
+AD7606 ad7606(MISO, SCLK, CS, CONVST, BUSY, RESET, 100000);
 //double analogValues[8] = {0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F};
 uint16_t rawValues[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+char buffer[100];
 
 int main() {
     pc.baud(115200);
     pc.printf("Hello, World!\r\n");
     while(1) {
         ad7606.readRawValues(rawValues);
-        //pc.printf("%04x, %04x, %04x, %04x, %04x, %04x, %04x, %04x\r\n", rawValues[0], rawValues[1],rawValues[2],rawValues[3],rawValues[4],rawValues[5],rawValues[6],rawValues[7]);
+        //pc.printf("%d, %d, %d, %d, %d, %d, %d, %d\r\n", rawValues[0], rawValues[1],rawValues[2],rawValues[3],rawValues[4],rawValues[5],rawValues[6],rawValues[7]);
         wait_ms(100);
     }    
-}
\ No newline at end of file
+}