Lab1_Part7
Fork of MCP23S17_Basic_IO_Demo by
Revision 4:58a089a8b601, committed 2018-01-31
- Comitter:
- bjs9
- Date:
- Wed Jan 31 06:14:18 2018 +0000
- Parent:
- 3:bdc6c6bafe13
- Child:
- 5:ec6bfed1bada
- Commit message:
- changes;
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:10:23 2018 +0000
+++ b/main.cpp Wed Jan 31 06:14:18 2018 +0000
@@ -51,13 +51,13 @@
// 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;
- if (B0 == 0)
- {
- chip.write(PORT_A,1); // output 1 at A0 to light up LED
- } else {
- chip.write(PORT_A,0); // turn off LED
- }
+ led1= chip.read(PORT_B)& 0x01;
+ // if (B0 == 0)
+ //{
+ // chip.write(PORT_A,1); // output 1 at A0 to light up LED
+ //} else {
+ // chip.write(PORT_A,0); // turn off LED
+ // }
// write 0xAA to MCP23S17 Port A
// chip.write(PORT_A, 0xAA);
//wait(.5);
