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

MCP23017 Working Principle

Learn how MCP23017 works with an illustrated explanation and practical readings.

Package view

MCP23017 at a glance

Follow the labeled connections and functional stages

MCP23017 working principle: illustrated functional stages, basic circuit and connections
Select the diagram to read it at full resolution.

How it works

3 stages · Explore one step at a time

Step 1 / 3

Initialize known states

After reset, preload output latches and select directions before using outputs. Keep unused inputs defined with pull-ups.

Step 2 / 3

Exchange register data

Send the device address, register address and data. BANK = 0 gives paired A/B register addresses used here.

Step 3 / 3

Service captured events

Enable selected interrupt sources. Read INTCAP to retrieve the captured port state, then debounce and process the event.

Component view