Hi guys
I’m using 2 MCP23017, I have read some topics for the use of multiple MCP23017 and in one of them says just to identify the second unit with a different address number from the first one, and that should do the job.
I tried this, and got the problem that even though I assign chip one as (0), default address, and chip 2 with a (1) whenever I turn on a digital output of mcp1, the same output is turn on, on mcp2.
@dsn101, the “address” in question is actually the an offset of the base I2C address of the MCP23017 device you are configuring. If you are using an MCP23017 breakout, these boards will usually have solder or other jumpers to configure the board’s address “offset” from the base addres of 0x20. The MCP23017 has three address bits meaning you can have up to eight of these devices on the I2C bus. You need to set the address jumpers for the second MCP23017 address to 1.
Sorry guys, already figure it out, I put pin 15 of the second MCP to voltage and keep pint 15 of the first one to ground.
What I understand is that, leaving the pins 15-17 will generate a default address(000), while putting one of them to voltage will set an address.
Thank you peekay123!!
Thank you for taking the time to answer me. I did find out reading a couple of arduino forums and the datasheet of the mcp about the address pin. I thought that I post the answer a couple of hours ago, but seems like I forgot to hit “reply” on my own post. Anyway, thank you!
Are you using the bare sensor or a breakout?
Usually breakouts don't behave that way. The usually have pull-down/-up resistors on board any the user is only required to cut or solder a jumper to avoid the need for extra wiring between the board and the controler. Wiring the address lines to the controler would only make (limited) sense if you'd want to change the address dynamically.