Use more that one I2C multiplexer with Arduino ??

i am trying to buy parts for an upcoming project.
can i use more than one of these i2c protocol multiplexers with arduino?
i would like to use three...

Yes, according to the factsheet

Features:
• Three hardware address pins allow use of up to eight devices

Those pins are labelled A0, A1, A2.

1.6 Address Decoder:
The last three LSb of the 7-bit address are user-defined (see Table 1-4).
Three hardware pins (A2:A0) define these bits.

TABLE 1-4: DEVICE ADDRESS

0 1 0 0 A2 A1 A0

And if you want more than 8 you can actually feed the I2C bus through a data selector.

excellent. just wanted to make sure.

Grumpy_Mike:
And if you want more than 8 you can actually feed the I2C bus through a data selector.

Hi Fuzzy Wobble

The MCP23016 have been discontinued, so I would suggest ordering the replacement MCP23017

If you have not used I2C before, check out Nick Gammon website for information he recently posted.

With the quote above, I do not believe you need that complexity. The I2C bus with MCP can have 8 devices on one SS (select) line. To create another set on the same bus, share the MISO/MOSI/SCK lines, but create another CS (SS) select line for the next set of devices. The only thing I have not checked is how many devices (loads) the ATMega can drive.

Regrads Bill

Additionally, I have a shield for the MCP23017 readymade with 4 chips on the board, plus cable and breakout boards for getting the 64 I/O out to a breadboard or screw terminals.

Bill_Kerr:
If you have not used I2C before, check out Nick Gammon website for information he recently posted.
Gammon Forum : Electronics : Microprocessors : I2C - Two-Wire Peripheral Interface - for Arduino

With the quote above, I do not believe you need that complexity. The I2C bus with MCP can have 8 devices on one SS (select) line. To create another set on the same bus, share the MISO/MOSI/SCK lines, but create another CS (SS) select line for the next set of devices.

Thanks for the mention! I find it helps me to understand things if I document them.

However I think in this case you are confusing SPI with I2C. SPI uses MISO/MOSI/SCK/SS lines, not I2C.

As far as the original question goes, since the expander has 16 ports, and you can multiplex up to 8 of them by jumpering the address-select lines, that gives you 128 ports which is probably enough for all but the most ambitious project. After that, another approach would be to use a second Arduino (this takes some of the processing load off the first one) and connect the two Arduinos together using SPI.

The expander shield looks cool BTW! Where do you get that? (EDIT: Oh, I see from the signature).

the replacement MCP23017

Note that there are two versions of this.
MCP23017 - I2C interface
MCP23S17 - SPI interface
Using the SPI interface is a lot faster than the I2C

macegr:
Additionally, I have a shield for the MCP23017 readymade with 4 chips on the board, plus cable and breakout boards for getting the 64 I/O out to a breadboard or screw terminals.

I realise that this is an old thread but hope that someone knowledgable will reply: Is the MCP23017-based board from macetech just a port expander or is it actually an I2C MUX that would enable me to connect many I2C devices with the same slave address to a single Arduino Uno? If it's the latter then I want one!

As you can see from the photo it is 4 x MCP23017 chips on a board. So it is 4 port expanders. Since each one has 16 ports that gives you 64 ports in total.

It is not an I2C MUX.

Thanks for the clarification.

I have triple 2 channel 4053.
Can you give example code for 4053?
two i2c convert to one i2c.

Can you give example code for 4053?

???
Just put out the channel you want to select on the pins attached to the three control lines on the chip. That is pins 11, 10 and 9 on the 4053.