ADF7023

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
dheerajmpai23
Date:
Thu Jul 09 06:57:06 2015 +0000
Commit message:
ADF7023

Changed in this revision

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 50e8145889a8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jul 09 06:57:06 2015 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+#include<iostream>
+using namespace std;
+#define ENDL "\r" << endl;
+//Output
+DigitalOut gpo(D9);
+void baud(19200);
+//clock
+InterruptIn clk(D8);
+int state=0;
+int j=0;
+int bit=7;
+unsigned char data [] = {0xFF,0xFF,0xFF};
+void change()
+{
+         cout<<"SENDING"<<ENDL;
+        if(bit<0)
+        {
+            j++;
+            bit=7;
+           
+            if(j == 3){
+                j = 0;
+            }
+        }
+        if(state==0)
+        {
+            gpo = (data[j] >> bit--) & 0x01 ;
+            state++;
+        }
+        else if (state==1)
+        {
+            state=0;
+        }
+}           
+       
+int main()
+{  
+    printf("HELLO\r\n");
+    while(true)
+    {
+        cout << "hoo" << "\r" << endl;
+        clk.fall(&change);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 50e8145889a8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jul 09 06:57:06 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file