Chaining multiple MCP23017 on i2c bus

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rahatmaini
 
Posts: 176
Joined: Wed Aug 29, 2012 5:15 pm

Chaining multiple MCP23017 on i2c bus

Post by rahatmaini »

How do I (through software and wiring) chain together multiple MCP23017 chips on i2c on Arduino? There was a little section on this site briefly mentioning it is possible but did not provide much more information.

How do I do this? :D

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Chaining multiple MCP23017 on i2c bus

Post by adafruit_support_mike »

Every I2C device has an address. When the device in control (called the 'bus master') sends an I2C command, the first thing it sends is the address of the device it wants to talk to.

The MCP23017 has three pins (15, 16, and 17) which set the address for that device. You wire the pins high or low for 8 different addresses on the same bus.

The datasheet for the chip (http://www.adafruit.com/datasheets/mcp23017.pdf) has more details.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”