#include <SPI.h>
#include "MCP23S17.h" // github.com/n0mjs710/MCP23S17
MCP outputchip(0, 10); // Chip address is 0 and CS pin is 10
void setup() {
outputchip.begin();
outputchip.pinMode(0B1111111111111111); // All pins are OUTPUT
outputchip.digitalWrite(0B1111111111111111); // Set all pins HIGH mode (to power LED)
}
void loop() {
}
The mcp23s17 connections with the Arduino boards:
mcp23s17
Arduino
11
D10
12
D13
13
D11
14
D12
The led should be ON but no do you see what is wrong with my setup/code please ? I thank you in advance
guix:
According to the library's readme, your pinMode sets all pins as inputs
Indeed, it's embarrassing... Thank you but it still does not work with this code:
#include <SPI.h>
#include "MCP23S17.h" // github.com/n0mjs710/MCP23S17
MCP outputchip(0, 10); // Chip address is 0 and CS pin is 10
void setup() {
outputchip.begin();
outputchip.pinMode(0B0000000000000000); // All pins are OUTPUT
outputchip.digitalWrite(0B1111111111111111); // Set all pins HIGH mode (to power LED)
}
void loop() {
}
I have tested every jumper and connection, it should work... I don't understand