TVZ test

Dependencies:   mbed

Revision:
1:abeac322d8d8
Parent:
0:5918d7a4ad04
Child:
2:2e261aa02cd0
diff -r 5918d7a4ad04 -r abeac322d8d8 main.cpp
--- a/main.cpp	Tue Jan 07 14:12:18 2014 +0000
+++ b/main.cpp	Tue Jan 07 16:44:56 2014 +0000
@@ -30,11 +30,12 @@
     valueADC = 0x0302;
     Outbuff[0] = valueADC;
     Outbuff[1] = valueADC >> 8;
-    
+    /*
     while (async_port.writeable()==0);  //is there a place to write?
     async_port.putc(Outbuff[1]);     //transmit switch_word
     while (async_port.writeable()==0);  //is there a place to write?
     async_port.putc(Outbuff[0]);     //transmit switch_word
+    */
     while (async_port.writeable()==0);  //is there a place to write?
     async_port.putc(switch_word);     //transmit switch_word
     if (async_port.readable()==1){     //is there a character to be read?
@@ -42,11 +43,12 @@
       }
     if (async_port.readable()==1){     //is there a character to be read?
       Inbuff[0] = async_port.getc();     //if yes, t
+      RXDIN = 1;
       }  
-    if (async_port.readable()==1){     //is there a character to be read?
+    /*if (async_port.readable()==1){     //is there a character to be read?
       recd_val=async_port.getc();     //if yes, t
       RXDIN = 1;
-      }
+      }*/
     wait(0.01);
 //set leds according to incoming word from slave
     red_led=0;              //preset both to 0