Hi !
I'm working with an Arduino UNO + Ethernet Shield V3
I'm trying to add Digit IO pins to my project using a MPC23S17 chip (precisely I bought this one : MCP23S17 ) And I'm having hard times...
I'm novice with electronic and wiring, so I tried to look everywhere I can on internet to find a clue on where I did wrong but didn't find anything yet.
So here is what I did :
-
Downloading and installing/importing the MCP23S17 librairy into my sketch
(this librairy : GitHub - n0mjs710/MCP23S17: Arduino Driver for Microchip MCP23S17
provided here : Arduino Playground - MCP23S17 Class for Arduino ) -
and did a small sketch to see if the chip works (or not) - I removed everything unrelated to the MCP23S17 part in my sketch, to make it clearer :
#include <MCP23S17.h>
#include <SPI.h>
#include <Ethernet.h>
#include <OSCBundle.h>
#include <EthernetUdp.h>
MCP mcp01(0);
void setup() {
Serial.begin(9600);
SPI.begin();
mcp01.pinMode(OUTPUT);
mcp01.digitalWrite(HIGH);
Serial.println(mcp01.digitalRead(1));
}
void loop() {
}
So this sketch should print a "1" from the pin 1 if i'm not wrong as I digitalWrite all the IO pins of the chip "HIGH", but actually it only give me 0 for the moment.
- my problem may probably come from my wiring so I made a shematic of it using Fritzing (fantastic tool by the way !).
In fritzing, i used a MPC23017 because I didn't find a MPC23S17 in the object librairy, but both of these chipset have the same number of pins if i'm not wrong so the schematic is the same as my "real" one.
First here is a MPC23S17 pin map :

and here is my shematic (I'm wiring it to the Ethernet Shield as I plugged the Ethernet Shield on the UNO already) :
here is a link to a bigger image if needed :
Does anyboady have an idea of what I did wrong ?

