Electronic Pro Blog | Epro

MCP23017 I2C Expander: 7 Pin and Register Checks

MCP23017: controlled port expansion — conceptual signal flow, not a wiring schematic

An MCP23017 expands digital control over I2C, but it is not sixteen unrestricted microcontroller pins. Match the current datasheet, fitted device and driver to the intended input and output allocation before ordering a carrier or assigning interrupt sources.

Check the current input restrictions

MCP23017: controlled port expansion — conceptual signal flow, not a wiring schematic
MCP23017: controlled port expansion — conceptual signal flow, not a complete wiring schematic.

The referenced revision E identifies GPA7 and GPB7 as output-only on MCP23017. Older examples may allocate buttons to those positions. Do not assume every one of the sixteen port positions is a supported input; select permitted input pins and verify the exact device documentation.

Distinguish the I2C and SPI variants

MCP23017 uses I2C, whereas MCP23S17 uses SPI. Similar package names and port labels do not make the serial interfaces interchangeable. Check the fitted marking, connector signals and library class rather than buying by the shared MCP23 prefix alone.

Plan hardware addresses and reset

Three address inputs permit up to eight hardware-selected addresses on a compatible bus. A software constructor cannot change the straps. Also inspect the active-low reset connection: an unconnected or noisy reset input can make apparent communication faults look like random configuration loss.

Understand direction, latch and pin state

Direction registers select input or output operation for supported pins. OLAT represents the stored output latch, while GPIO reads actual port state. This distinction matters when preserving output values or diagnosing a heavily loaded output that does not reach the expected voltage.

Keep the register map consistent

The BANK setting changes register addresses, and sequential-access configuration changes how multi-byte transactions advance. A driver expecting one map can alter unrelated settings if another routine changes BANK. Choose one configuration owner and keep raw register code consistent with the maintained library.

Select the interrupt strategy deliberately

Ports have separate interrupt paths that can be mirrored or configured for appropriate output signalling. GPIO or INTCAP reads can clear the associated interrupt, so polling and event capture must cooperate. This capture mechanism is not an unlimited queue of every edge from a fast signal.

Newest in the store

Treat outputs as limited logic drivers

Check per-pin, total-device and supply-current limits rather than multiplying a headline single-pin maximum by sixteen. Start with logic inputs or a conservatively resistor-limited LED. Motors, relay coils and other substantial loads need a properly designed external driver and protection, not a direct port connection.

Frequently asked questions

Can all sixteen positions be used for buttons?

Not under the referenced current MCP23017 restrictions: GPA7 and GPB7 are output-only.

Does reading GPIO return the output latch?

It reads the port state. Read OLAT when the stored latch value is required.

Availability and illustration note

No matching Epro product was returned by the catalog search on 21 October 2026 UTC. This learning guide does not assert stock, a selling price or compatibility of an unidentified substitute. The illustration is an original conceptual signal-flow diagram, not a product photograph or complete wiring schematic.

Related Epro reading

For a first bench setup, review breadboard connections and continuity checks and I2C voltage-level translation. These guides do not replace the exact module schematic.

Technical references and limitations

Source: Microchip MCP23017/MCP23S17 datasheet, revision E. Electrical limits apply to the named part, not automatically to every carrier board. This is a documentation-based learning workflow, not a claim of independent hardware testing, traceable calibration or safety certification.

Newest in the store

Leave a Reply

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