Important Note

This entire repo was AI created - including all of the data within. The intent was to A) help me with my personal electronics inventory; and B) see how I could use AI to make that process a bit easier. DO NOT TRUST!

MCP23017-E/SP - 16-Bit I/O Expander with I2C Interface

Details

Description

The MCP23017 is a 16-bit I/O expander that provides additional GPIO pins for microcontrollers through an I2C interface. It features two 8-bit ports (Port A and Port B) that can be configured independently as inputs or outputs. This IC is ideal for expanding the I/O capabilities of Arduino, Raspberry Pi, and other microcontroller systems when you need more digital pins than are available on the main controller.

Specifications

Electrical Characteristics

  • Operating Voltage: 1.8V ~ 5.5V
  • Supply Current: 1mA (quiescent), 1µA (standby)
  • Clock Frequency: 1.7MHz (I2C)
  • Output Current: 25mA per pin
  • Logic Levels:
    • Logic Low: max 0.2 × VDD
    • Logic High: min 0.8 × VDD

Physical Characteristics

  • Package: 28-SPDIP (0.300”, 7.62mm)
  • Dimensions: Standard 28-pin DIP package
  • Operating Temperature: -40°C ~ 125°C
  • Mounting Type: Through Hole

Key Features

  • 16 GPIO pins (two 8-bit ports)
  • I2C interface (up to 8 devices on same bus)
  • Configurable interrupt output
  • Power-on reset (POR)
  • Push-pull outputs
  • Individual pin direction control
  • Hardware address pins for multiple devices
  • 3.3V and 5V compatible

Image

Image needed - Standard 28-pin DIP package IC with MCP23017-E/SP markings on top. Consider taking a photo of actual component for documentation.

Pinout Diagram

Pin Descriptions (28-SPDIP Package)

PinNameFunction
1GPB0Port B bit 0
2GPB1Port B bit 1
3GPB2Port B bit 2
4GPB3Port B bit 3
5GPB4Port B bit 4
6GPB5Port B bit 5
7GPB6Port B bit 6
8GPB7Port B bit 7
9VDDPower supply (+1.8V to +5.5V)
10VSSGround
11NCNot connected
12SCLI2C clock
13SDAI2C data
14NCNot connected
15A0Address select bit 0
16A1Address select bit 1
17A2Address select bit 2
18RESETReset input (active low)
19INTBInterrupt output for Port B
20INTAInterrupt output for Port A
21GPA0Port A bit 0
22GPA1Port A bit 1
23GPA2Port A bit 2
24GPA3Port A bit 3
25GPA4Port A bit 4
26GPA5Port A bit 5
27GPA6Port A bit 6
28GPA7Port A bit 7

Applications

Common use cases and applications for this component:

  • Arduino and Raspberry Pi GPIO expansion
  • LED matrix control
  • Keypad/button matrix scanning
  • Sensor input expansion
  • Relay control boards
  • Industrial control systems
  • Home automation projects
  • Robot control systems

Circuit Examples

Basic I2C Connection

VDD (Pin 9) ---- +3.3V or +5V
VSS (Pin 10) --- Ground
SCL (Pin 12) --- I2C Clock (Arduino A5, RPi GPIO 3)
SDA (Pin 13) --- I2C Data (Arduino A4, RPi GPIO 2)
RESET (Pin 18) - VDD (or control pin)
A0-A2 (Pins 15-17) - Address selection (GND/VDD)

LED Control Example

GPA0-GPA7 (Pins 21-28) -> LEDs with current limiting resistors
GPB0-GPB7 (Pins 1-8) -> Additional LEDs or other outputs
Configure all pins as outputs in software

Button Input Example

GPA0-GPA7 (Pins 21-28) -> Buttons with pull-up resistors
Configure pins as inputs with internal pull-ups enabled
Use interrupt pins (INTA/INTB) for change detection

Technical Notes

Important technical considerations and features:

  • I2C Address: Base address 0x20, configurable with A0-A2 pins
  • Multiple Devices: Up to 8 MCP23017s on same I2C bus (addresses 0x20-0x27)
  • Pull-up Resistors: Internal 100kΩ pull-ups available on all GPIO pins
  • Interrupt Capability: Separate interrupt outputs for each port
  • Power Supply Decoupling: Use 0.1µF ceramic capacitor near VDD pin
  • I2C Pull-ups: Require external pull-up resistors on SCL/SDA lines (4.7kΩ typical)
  • Reset Pin: Can be tied to VDD if not used for control
  • Pin Current: Maximum 25mA per pin, 125mA total per port

Programming Notes

  • Arduino Libraries: Available libraries like “Adafruit MCP23017” simplify usage
  • Register Access: Direct register manipulation possible for advanced control
  • Initialization: Requires setting IODIR registers to configure pin directions
  • Interrupt Handling: Can trigger on pin change or compare against reference value
  • Port Operations: Can read/write entire 8-bit ports or individual pins

Tags

io-expander, interface-ic, i2c, gpio, microchip, mcp23017 cabinet-3 bin-38 status-available

Notes

The MCP23017 is one of the most popular and widely-used I/O expanders in the maker and embedded systems community. Its I2C interface makes it easy to add 16 additional GPIO pins using only two wires from your microcontroller. The ability to chain up to 8 devices on the same bus means you can potentially add 128 GPIO pins with minimal pin usage on your main controller. Having 24 of these ICs provides excellent flexibility for projects requiring extensive I/O expansion, from simple LED control to complex industrial automation systems.