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
How it works
3 stages · Explore one step at a time
Initialize known states
After reset, preload output latches and select directions before using outputs. Keep unused inputs defined with pull-ups.
Exchange register data
Send the device address, register address and data. BANK = 0 gives paired A/B register addresses used here.
Service captured events
Enable selected interrupt sources. Read INTCAP to retrieve the captured port state, then debounce and process the event.
Step 1 of 3