MCP23017 HAT – 32 Channel I/O Expansion HAT


The MCP23017 HAT from ModMyPi and is the perfect I/O expansion HAT for your Raspberry Pi A+/B+/2/3 etc. The HAT features two removable MCP23017 DIP IC’s, which utilise two i2c pins (which can be shared with other devices if required), and in exchange gives your Raspberry Pi an additional 32 GPIO ports! Each I/O pin can be configured as an in input, output or an input with a pullup resistor. The MCP23017 HAT is stackable, featuring selectable i2c address jumpers which supports up to 8 independent addresses: This means you can add up to 128 additional I/O’s to a single Raspberry Pi by stacking up to 4 MCP23017 HAT’s!


The MCP23017 HAT can also be used to protect your Raspberry Pi! ModMyPi has used removable, rather than surface mount, MCP23017 DIP IC’s which can act as replaceable buffer for the Raspberry Pi’s GPIO, essentially protecting your Raspberry Pi from damage via the GPIO ports. The MCP23017 HAT is powered via the Raspberry Pi’s GPIO port, but features an included (but unsoldered) terminal block for advanced users wanting to use an external 5V source, or stack multiple MCP23017 HATS on a single Pi. The isolation jumper “PWR JUMPER” must be removed when using an external source.

This product comes fully assembled with push-fit “plug & play” header, and HAT mounting kit, so there’s no soldering required, and you can get started in no time with ModMyPi’s Wiki & Example Code!

Please Note. The external power terminal block is NOT soldered onto the board, and is designed for advanced users only.

2 x MCP23017 IC’s
Removable & Replaceable DIP Packaged IC’s – If you damage one, simply replace!
Selectable i2c Address Jumpers – Supports up to 8 Independent Addresses
32 Port GPIO Expander Board with Configurable I/O’s (Input/Ouput/Input w/ Pullup)
Jumper Isolated Terminal Block 5V Input
Stackable (Up for 4 MCP23017 HATs, and up to 128 I/O’s)
HAT Compliant
MCP23017 HAT Kit Includes:
1 x Fully Assembled MCP23017 HAT with 2 x MCP23017 IC’s
1 x Mounting Kit: 4 x M2.5 16mm F/F Stand-offs & 8 x M2.5 5mm Bolts
1 x Push Fit 40 Pin Extra Tall Header
1 x Unsoldered Two Point Screw Terminal Block
The MCP23017 Features:
16 bit remote bidirectional I/O port
High speed I2C interface
Three hardware address pins to allow up to eight devices on the bus
Configurable interrupt output pins – active-high, active-low or open-drain
INTA and INTB can be configured to operate independently or together
Configurable interrupt source – based on input changes, so you don’t need to keep polling the chip
Polarity Inversion register to configure the polarity of the input port data
External Reset input
Low standby current: 1μA max.
MCP23017 Specifications:
Bus Frequency: 1.7MHz
Chip Configuration: 16bit
IC Interface Type: I2C, Serial
Interface Case Style: DIP
No. of I/O’s: 16
No. of Pins: 28
Supply Voltage Max: 5.5V
Supply Voltage Min: 1.8V


MCP23017 Datasheet

MCP23017 HAT Wiki w/ Hardware & Software Installation & Examples

Example Code


There are no reviews yet.

Be the first to review “MCP23017 HAT – 32 Channel I/O Expansion HAT”

Your email address will not be published. Required fields are marked *