Lab1_Part7

Dependencies:   MCP23S17 mbed

Fork of MCP23S17_Basic_IO_Demo by jim hamblen

Files at this revision

API Documentation at this revision

Comitter:
bjs9
Date:
Wed Jan 31 06:22:29 2018 +0000
Parent:
5:ec6bfed1bada
Child:
7:2e7fe8cc61fc
Commit message:
Changes to lab part 7; ;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Jan 31 06:19:25 2018 +0000
+++ b/main.cpp	Wed Jan 31 06:22:29 2018 +0000
@@ -50,7 +50,8 @@
 //  Start Loopback test sending out and reading back values
 //  loopback test uses A0 and B0 pins - so use a wire to jumper those two pins on MCP23S17 together
     while (1) {
-        B0 = chip.read(PORT_B)& 0x01;
+        B0 = !(chip.read(PORT_B)& 0x01);
+        
         chip.write(PORT_A,B0);
         //    chip.write(PORT_A,0); // turn off LED
         // write 0xAA to MCP23S17 Port A