Electrical – Setting the address of MCP23017 IO Expander when using Multiple

gpiointegrated-circuitiopcbraspberry pi

I'm trying to use the MCP23017 I2C port extender which has 3 addressing pins to be externally biased to set the I2C device address.

How should I connect the 3 addressing pins to select the I2C address that I want? I was not able to identify a table mapping the biasing to the I2C address in its datasheet.

Also, should I be biasing by connecting some address pins to GND, some to 5V of my Raspberry? Diagram below show show I am currently wiring up three MCP23017 to a single Raspberry 3. Does the wiring look ok?

[Link to clearer image]

enter image description here

Best Answer

Figure 3.4 (Page 15 of the datasheet shows the device addressing), and yes A0,1,2 are digital inputs, 0 or 5V depending should be fine.

Read the device errata I recall being being some shenanigans, but that may have been only the SPI variant.

Related Topic