0
\$\begingroup\$

I have a hand full of MCP23017 (16 bit multiplexers/ I/O Expander) but I can only get 8 IC on the bus due to the limit of address but I need 200 pins (about 13 ICs) for a 8*8*8 RGB cube and was thinking about and wondering what issues I might have if. A. changing the addresses of the IC actively OR B. use a transistor to disconnect the clock of on set of ic's and control the other set

I don't like the idea of a shift register because of size and programming headache

MCP23017 data sheet

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Why not use MCP23S17 instead? \$\endgroup\$ Commented Dec 12, 2013 at 19:57

1 Answer 1

1
\$\begingroup\$

While some devices will work well with the address being switched while powered on, most datasheets will not reflect that. You will need to test it. To do that, you will need a few spare pins, or an extra 16 bit expander, to drive the address pins. A setup could be have the 13 led expanders A2 and A1 pins tied to logic high. A 14th expander, for driving the A0 pin, with A2, A1, and A0 tied to logic low (0x20). Every time you need to update a new expander, you update the address expander first, then the actual led expander. This adds a 2 to 3 byte i2c transaction to each update.

You have two main options for alternatives though. On the Arduino, you could use the software I2C library to have a second i2c bus. This can be on any two pins. Put 8 on one, 5 on the other.

Or for general i2c compatibility, a i2c multiplexer/hub/bus extender/repeater/switch (They have many names). Depending on the speed you are using (400kHz vs 1.7MHz [FM+]) you will need to find an appropriate one. Most are for 400kHz use. These allow you to connect two i2c buses, and switch between them.

\$\endgroup\$
2
  • \$\begingroup\$ what about using a transistor to disconnect the clock of one set of ic's and control the other set? \$\endgroup\$ Commented Dec 13, 2013 at 21:47
  • \$\begingroup\$ @RexFenderBaird Less than ideal. You could try it. See i.sstatic.net/fnI46.png The bottom one is the SCL line. You would just double it. It won't support clock stretching, and might not work. A i2c switch is better. \$\endgroup\$
    – Passerby
    Commented Dec 13, 2013 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.