Code for lab 2 Exp 3

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
2236693B
Date:
Thu Feb 15 15:05:08 2018 +0000
Commit message:
Part 2

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 c2c9de3fb71d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Feb 15 15:05:08 2018 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+DigitalOut gpo(PTD7);
+AnalogOut Aout(PTE30);
+Serial async_port(PTA2,PTA1);
+char x,count;
+unsigned int val;
+
+int main() {
+ async_port.baud(9600);
+ count=0;
+
+ while(1) {
+ gpo=count & 1;
+ x=async_port.getc();
+ val = 256*x;
+ Aout.write_u16(val); 
+ count++;
+ }
+} 
diff -r 000000000000 -r c2c9de3fb71d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Feb 15 15:05:08 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/7130f322cb7e
\ No newline at end of file