1PIN 1 · Port BGPB0Configurable digital I/O FunctionPort B bit 0; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
2PIN 2 · Port BGPB1Configurable digital I/O FunctionPort B bit 1; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
3PIN 3 · Port BGPB2Configurable digital I/O FunctionPort B bit 2; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
4PIN 4 · Port BGPB3Configurable digital I/O FunctionPort B bit 3; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
5PIN 5 · Port BGPB4Configurable digital I/O FunctionPort B bit 4; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
6PIN 6 · Port BGPB5Configurable digital I/O FunctionPort B bit 5; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
7PIN 7 · Port BGPB6Configurable digital I/O FunctionPort B bit 6; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
8PIN 8 · Port BGPB7Output only FunctionThe current MCP23017 datasheet restricts this terminal to output use. Do not allocate it to a switch or sensor input. How to connectConfigure as output LOW and leave open when unused.Electrical noteGPA7 / GPB7 output-only restriction is specific to MCP23017; do not inherit MCP23S17 input capability.
9PIN 9 · SupplyVDDSupply FunctionPowers logic and I/O. Supply, temperature and bus-rate conditions must be considered together. How to connectUse +5 V and 100 nF to VSS10.
10PIN 10 · GroundVSSGround FunctionSupply and signal reference. How to connectJoin controller ground.
11PIN 11 · Not connectedNCNo connection FunctionNot used on the I²C MCP23017. How to connectLeave unconnected.Electrical noteThis is CS on the different SPI MCP23S17.
12PIN 12 · I²C busSCLI²C clock input FunctionClock for register transfers. How to connectConnect to host SCL and a suitable pull-up to +5 V.Electrical note100 kHz example; faster modes require their own voltage and timing conditions.
13PIN 13 · I²C busSDAI²C data I/O FunctionOpen-drain serial data line. How to connectConnect to host SDA and a suitable pull-up to +5 V.
14PIN 14 · Not connectedNCNo connection FunctionNot used on the I²C MCP23017. How to connectLeave unconnected.Electrical noteThis is SO on the different SPI MCP23S17.
15PIN 15 · Hardware addressA0Address input FunctionSets hardware address bit 0; all three LOW select 0x20. How to connectTie directly to GND in the example.Electrical noteDo not leave address inputs floating.
16PIN 16 · Hardware addressA1Address input FunctionSets hardware address bit 1; all three LOW select 0x20. How to connectTie directly to GND in the example.Electrical noteDo not leave address inputs floating.
17PIN 17 · Hardware addressA2Address input FunctionSets hardware address bit 2; all three LOW select 0x20. How to connectTie directly to GND in the example.Electrical noteDo not leave address inputs floating.
18PIN 18 · Hardware resetRESET̅Active-LOW reset input FunctionResets registers and places outputs in the reset state. How to connectUse a 10 kΩ pull-up to +5 V and a controller or reset switch to GND.Electrical noteMinimum LOW reset pulse is 1 µs.
19PIN 19 · Interrupt outputsINTBPort B interrupt FunctionConfigurable polarity and push-pull/open-drain output. May be mirrored with INTA through IOCON. How to connectLeave open in this example; port B interrupts are disabled.
20PIN 20 · Interrupt outputsINTAPort A interrupt FunctionReports enabled input conditions. GPIO or INTCAP reads clear the associated interrupt as specified. How to connectUse open-drain mode with 10 kΩ pull-up to +5 V and connect host IRQ.Electrical noteIOCON.ODR = 1 enables open-drain, active-LOW operation.
21PIN 21 · Port AGPA0Configurable digital I/O FunctionPort A bit 0; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectConnect LED cathode; anode through 1 kΩ to +5 V.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
22PIN 22 · Port AGPA1Configurable digital I/O FunctionPort A bit 1; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectConnect pushbutton to GND; enable input mode and weak pull-up.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
23PIN 23 · Port AGPA2Configurable digital I/O FunctionPort A bit 2; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
24PIN 24 · Port AGPA3Configurable digital I/O FunctionPort A bit 3; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
25PIN 25 · Port AGPA4Configurable digital I/O FunctionPort A bit 4; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
26PIN 26 · Port AGPA5Configurable digital I/O FunctionPort A bit 5; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
27PIN 27 · Port AGPA6Configurable digital I/O FunctionPort A bit 6; IODIR selects input/output, GPPU enables weak pull-up, and interrupt registers control input-change detection. How to connectLeave open with input weak pull-up enabled in this example.Electrical noteRead GPIO for terminal levels and OLAT for the output latch.
28PIN 28 · Port AGPA7Output only FunctionThe current MCP23017 datasheet restricts this terminal to output use. Do not allocate it to a switch or sensor input. How to connectConfigure as output LOW and leave open when unused.Electrical noteGPA7 / GPB7 output-only restriction is specific to MCP23017; do not inherit MCP23S17 input capability.