I am working on a project that will use a grid of 24x24 Hall Effect sensors. A3144
To do this I will need to use multiplexing and one option to avoid solder and labor of 10k ohm resitors was to purchase MCP23S17. vs CD74HC4067 (which will require 10k resitor per HED).
So cost of chip more is well worth avoiding labor in soldering 500 resisors. But testing with even basic structure I am not making progress.
/ ┌────────┐
// GPB0(1) │● ○│ (28) VDD (+5V)
// GPB1(2) │ │ (27) VSS (GND)
// GPB2(3) │ │ (26) RESET
// GPB3(4) │ │ (25) A2
// GPB4(5) │ │ (24) A1
// GPB5(6) │ │ (23) A0
// GPB6(7) │ │ (22) INTA
// GPB7(8) │ │ (21) INTB
// NC(9) │ │ (20) CS
// NC(10) │ │ (19) SCK
// GPA7(11)│ │ (18) SI (MOSI)
// GPA6(12)│ │ (17) SO (MISO)
// GPA5(13)│ │ (16) GPA0
// GPA4(14)│ │ (15) GPA1
// └────────┘
I have even rulled out the HED and KISS to pin 1 (withi dot). Ground or +5v
#include <SPI.h>
#include <Adafruit_MCP23X17.h>
Adafruit_MCP23X17 mcp;
const int mcpCS = 2; // MCP CS → D2
const int testPin = 0; // GPB0 (MCP pin 1)
void setup() {
Serial.begin(115200);
SPI.begin(); // Uses D13, D11, D12
if (!mcp.begin_SPI(mcpCS)) {
Serial.println("MCP init failed");
while (true);
}
Serial.println("MCP initialized");
// Configure GPB0 as input with pull-up
mcp.pinMode(testPin, INPUT);
mcp.digitalWrite(testPin, HIGH); // Enable pull-up
}
void loop() {
bool pinState = mcp.digitalRead(testPin);
Serial.print("GPB0 voltage level: ");
Serial.println(pinState ? "HIGH (+5V)" : "LOW (GND)");
delay(500);
}
But serial output ( reset button to capture new state). During test I move pin from ground to +5v but it no change.
20:11:07.576 -> MCP initialized
20:11:07.576 -> GPB0 voltage level: LOW (GND)
20:11:08.069 -> GPB0 voltage level: LOW (GND)
20:11:08.562 -> GPB0 voltage level: LOW (GND)
20:11:09.088 -> GPB0 voltage level: LOW (GND)
20:11:09.582 -> GPB0 voltage level: LOW (GND)
20:11:10.076 -> GPB0 voltage level: LOW (GND)
20:11:10.571 -> GPB0 voltage level: LOW (GND)
20:11:11.097 -> GPB0 voltage level: LOW (GND)
This is same if I have pin 1 (GPB0) connected to nothing, to ground, or to +5v.
But then I find other sites where diagrams show:
I tried both. but same result. I know this chip is “packaged” multiple ways” but WHY the pins are different ?!!?!?
Question:
-
Silkscreen on chip is MCP23S17-E/SP (I purchased 30 of them). Does anyone have some experience with these mux chips with Arduinio Uno R4 Wifi?
-
Any recommendations on how to debug? I figured if I KISS to just Ground vs +5 it would prove out chip logic, but then went down rabbit whole of chip pin layout.









