Working with I2C port expanders

There are times when you don’t need much processing power for your project but you do need a lot of I/O pins. It often doesn’t make economic sense to choose a larger microcontroller just to get extra pins so the answer is to use a port expander chip. [Raendra] posted a guide for using one of these chips, it’s a Microchip MCP23008 chip that uses the I2C protocol for communications.

You are probably already familiar with using shift registers like the 595 series for port expansion. There can be benefits to using an I2C device instead. One of them comes when using multiple port expander chips. With cascading shift registers you must always shift in the data for the entire chain of chips. But I2C devices are individually addressable, so you only need to push data over the I2C bus for the chips that need to be changed, the others will remain unaffected. It is especially easy to use these if you already have another I2C device in your project design as the addition only requires the connection of the SDA and SCL lines. Keep them in mind for future undertakings.

Comments

  1. Great info here too.
    http://focus.ti.com/lit/sg/sszc003c/sszc003c.pdf?HQS=hpa_i2cguide_050611

    I love this stuff…so much better than the TAFFE rubber-stamp “Try Arduino First For Everything” logic.

  2. Alberto Nunez says:

    Originaly Microchip’s PIC was designed as I/O expander for General Instruments CP16000 processor

  3. Gösta says:

    Great!

    @KanchoBlindside And that is a good read, thank you!

  4. How do people get around the 3000 fee for the slave address?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 91,402 other followers