MCP23017 IO Expander - johnosbb/Automation GitHub Wiki

MCP23017

The MCP23017 IO Expander is especially handy when working with a chip like the ESP8266 that has only limited I/O. The MCP23017 is an I2C enabled 16 I/O port chip. That means that you only need 2 pins to control the chip.

The 16 I/O lines are divided into an 8 I/O PORT A and an 8 I/O PORT B. Both can be used as input as well as output. The chip also has 2 configurable interrupts. The chip can take a Vcc from 2.7V to 5V and this is perfect for 3.3 Volt devices as the modern arduino's and the ESP8266 range.

Library pin # Port bit Package pin (DIP/SSOP/QFN) Silkscreen label
0 GPA0 21 A0
1 GPA1 22 A1
2 GPA2 23 A2
3 GPA3 24 A3
4 GPA4 25 A4
5 GPA5 26 A5
6 GPA6 27 A6
7 GPA7 28 A7
8 GPB0 1 B0
9 GPB1 2 B1
10 GPB2 3 B2
11 GPB3 4 B3
12 GPB4 5 B4
13 GPB5 6 B5
14 GPB6 7 B6
15 GPB7 8 B7