Skip to datasheet
16-bit register-controlled I²C port expander

MCP23017 Specifications

Review MCP23017 electrical specifications, operating conditions and package details.

Package view

Key specifications

Each port has direction, latch, input and interrupt registers. The host configures these deliberately, then accesses GPIO and OLAT for different purposes.

Digital port lines16 14 I/O + 2 output-only
Example supply5 V
I²C modes100 / 400 kHz · 1.7 MHz under stated conditions
At 4.5–5.5 V−40–125 °C

Operating profile

Supply, signals and operating conditions

MCP23017 operating profile
ParameterValueConditions / notes
Selected packageSPDIP-28MCP23017-E/SP
7-bit addresses0x20–0x27A2 · A1 · A0
Input restrictionGPA7 / GPB7Use these two as outputs only
Use these values with the stated grade and test conditions.

Package details

MCP23017-E/SP · SPDIP-28

Selected package
Selected MCP23017 physical package
PropertyDetails
ManufacturerMicrochip Technology
Part numberMCP23017-E/SP
PackageSPDIP-28
Connections28 pins
MountingThrough-hole
Lead pitch2.54 mm
Package codedip
Thermal referenceBoard and package dependent; see manufacturer data

Useful register map

IOCON.BANK = 0

Scroll sideways to see all columns.

ParameterValueConditions / notes
IODIRA / IODIRB0x00 / 0x011 = input; 0 = output; obey bit-7 restriction
IPOLA / IPOLB0x02 / 0x03Input polarity inversion
GPINTENA / GPINTENB0x04 / 0x05Interrupt enable per input
DEFVALA / DEFVALB0x06 / 0x07Default comparison values
INTCONA / INTCONB0x08 / 0x09Previous-state versus default comparison
IOCON0x0A or 0x0BBANK, MIRROR, SEQOP, ODR and polarity
GPPUA / GPPUB0x0C / 0x0DWeak input pull-up enables
INTFA / INTFB0x0E / 0x0FWhich enabled pins triggered
INTCAPA / INTCAPB0x10 / 0x11Captured port values at interrupt
GPIOA / GPIOB0x12 / 0x13Read terminal levels; writes update latch
OLATA / OLATB0x14 / 0x15Read/write output latches

Changing IOCON.BANK changes register addresses. These values intentionally use the reset BANK = 0 arrangement.

Example initialization

5 V · address 0x20 · BANK = 0

Scroll sideways to see all columns.

ParameterValueConditions / notes
IOCON 0x0AWrite 0x04Open-drain INTA/B; BANK remains 0
OLATA 0x14Write 0x01Preload GPA0 HIGH so LED starts off
OLATB 0x15Write 0x00Preload unused GPB7 output LOW
IODIRA 0x00Write 0x7EA0 and A7 outputs; A1–A6 inputs
IODIRB 0x01Write 0x7FB7 output; B0–B6 inputs
GPPUA / GPPUBWrite 0x7E / 0x7FDefine unused inputs and pull button HIGH
INTCONA 0x08Write 0x00Compare enabled inputs with previous value
GPIOA 0x12Read onceEstablish current state before enabling interrupt
GPINTENA 0x04Write 0x02Enable GPA1 change notification

This sequence reserves both bit-7 pins for outputs and leaves the other unused lines safely defined.

Example control and interrupt service

Separate the output latch from input samples

Scroll sideways to see all columns.

ParameterValueConditions / notes
LED onOLATA bit0 = 0GPA0 sinks current through the LED
LED offOLATA bit0 = 1GPA0 is HIGH
Button stateGPIOA bit1LOW when button shorts to GND
Captured eventRead INTCAPA 0x10Read before another operation clears the event
Interrupt sourceRead INTFA 0x0EFlag bits identify enabled causes
Output updatesUse OLAT or a software shadowAvoid rewriting sampled input levels as outputs
Firmware debounceRequired for a mechanical buttonInterrupt edges are not automatically debounced

GPIO/INTCAP reads have interrupt-clear side effects. Design the service order deliberately.

Supply and I/O limits

Conditions distinguish the operating ranges

Scroll sideways to see all columns.

ParameterValueConditions / notes
VDD at −40 to +85°C1.8–5.5 VBus-rate constraints still apply
VDD at +85 to +125°C4.5–5.5 VSelected E-grade high-temperature operation
GPIO / bus / reset HIGH≥ 0.8 VDDSchmitt-trigger inputs
GPIO / bus / reset LOW≤ 0.2 VDDSchmitt-trigger inputs
Address HIGH / LOW≥ 0.25 VDD + 0.8 V / ≤ 0.15 VDDA0, A1 and A2
GPIO LOW≤ 0.6 V at 8 mAVDD 4.5 V
GPIO HIGH≥ VDD − 0.7 V at −3 mAVDD 4.5 V
Weak pull-up current75 µA typical; 40–115 µAVDD 5 V; pin at GND
Supply current1 mA maximumSCL/SCK 1 MHz
Standby current1 µA max. through +85°C3 µA max. at +85–125°C and 4.5–5.5 V

The 25 mA per-output figure is an absolute maximum; loaded voltage specifications provide the usable drive conditions.

Bus-rate and reset requirements

Use the correct supply for each mode

Scroll sideways to see all columns.

ParameterValueConditions / notes
100 kHzVDD 1.8–5.5 VSCL HIGH ≥4 µs; LOW ≥4.7 µs
400 kHzVDD 2.7–5.5 VSCL HIGH ≥0.6 µs; LOW ≥1.3 µs
1.7 MHzVDD 4.5–5.5 VSCL HIGH ≥0.12 µs; LOW ≥0.32 µs
Bus capacitance400 pF at 100/400 kHz100 pF at 1.7 MHz
Maximum rise time1000 / 300 / 160 ns100 kHz / 400 kHz / 1.7 MHz
Reset LOW pulse1 µs minimumRESET must be externally biased
Output update delay500 ns maximumSpecified GPIO timing conditions

The example uses 100 kHz and 4.7 kΩ pull-ups on a short bus. Recalculate pull-ups for the actual capacitance and speed.

Physical wiring

SPDIP-28 / SOIC-28 selected pin map

Scroll sideways to see all columns.

ParameterValueConditions / notes
PowerVDD9 +5 V; VSS10 GND100 nF at the IC
I²CSCL12 and SDA134.7 kΩ pull-ups to +5 V
AddressA0 pin15, A1 pin16, A2 pin17 to GND7-bit address 0x20
ResetRESET18 with 10 kΩ pull-upController reset or switch may pull LOW
LEDGPA0 pin21 to cathodeAnode through 1 kΩ to +5 V
ButtonGPA1 pin22 to switch to GNDGPPUA bit1 enabled
InterruptINTA20 to host IRQ10 kΩ pull-up; IOCON.ODR = 1
Unused terminalsNC11/14 and INTB19 openA7/B7 outputs LOW and open; other unused GPIO pulled up

The controller and pull-ups use the same 5 V logic domain. Do not assume 3.3 V meets the 5 V input HIGH threshold.

Packages and stress limits

MCP23017-E/SP · SPDIP-28

Scroll sideways to see all columns.

ParameterValueConditions / notes
SP packageSPDIP-28; 2.54 mm pitch7.62 mm row spacing
SO packageWide SOIC-28; 1.27 mm pitch7.50 mm body width
NC pins11 and 14 on these packagesThe imported logical symbol has 26 electrical pins; the physical map has 28
Maximum output current±25 mA absolute maximum per pinNot a recommended continuous target
Supply/ground absolute current125 mA into VDD; 150 mA out of VSSSum loads and observe thermal limits
Storage temperature−65 to +150°CUnpowered
MCP23S17 distinctionSPI interface and different pin useDo not copy its CS/SO wiring or bit-7 input capability

Package selection preserves the physical pin numbers and uses the appropriate footprint.

Connections by function

Select a pin for its function, connection guidance and electrical notes.

Port B8 pins

Supply1 pin

Ground1 pin

Not connected2 pins

I²C bus2 pins

Hardware address3 pins

Hardware reset1 pin

Interrupt outputs2 pins

Port A8 pins

Read the conditions with every value

Typical values describe stated test conditions. Absolute maximum ratings are stress limits, not operating targets.

Official PDF datasheet

Component view