I am using GPIO expanders (MCP23017) for an array of buttons. Each button is connected between GND and an input pin of the expander. I've enabled the 100k internal pull-up resistor on the MCP23017 (and verified that I did this correctly), so the input pin should idle high at 5V and the button will pull it low when pressed.
This does not happen. When unpressed, the voltage measured between GND and the input pin is about .1-.2V (should be 5V). When I measure between the input pin and the Vcc that I'm providing the expander, the difference is also about .1-.2V (should be 0V). The difference between GND and Vcc is a consistent 5V.
When I press the button, it works properly, pulling the input pin to 0, but why will the input pin not idle high? Is it floating? I can't figure out what voltage it's at and my measurements don't make any sense. What am I doing wrong?
MCP23017 Datasheet (I have IOCON set to 0xD0 and GPPUA, GPPUB, GPINTENA, GPINTENB set to 0xFF, all other registers are default).