Arduino I2C expansion I/O

Did you have a situation when you ran out of microcontroller pins. Especially when you do lots of interfacing, adding many buttons or LEDs then you definitely need many I.O pins. Sometimes you can use more advanced microcontrollers, but this isn’t best solution especially when you don’t need much processing power. Why not to use I/O port expansion?

Keith decided to experiment with I2C port expanders connected to Arduino board. He used Texas Instruments PCA9535 and PCA9555 16-bit I/O port expanders – one for inputs and another for outputs. This way he managed to add 16 additional I/O pins by scarifying 2 MCU pins. Author has provided a generous description about whole process and even gives us a program code for trying.

[..Source link..]

Bookmark the permalink.


  1. Hi,
    It is always good to have I2C on system design because on the same bus may be connected as many as 127 devices. I use it for EEPROM (AT24C02) and RTC (DS1307), but is is possible to add more at any time without changes on PCB on external connector. The connector has 4 pins: GND, VCC, SDA, SCL.
    The MCU is from 8051 family, and the I2C code is very compact, so I use it even on AT89C2051.
    All I2C related routines are published on my site.
    Hope you will find some useful idea.

    Best Regards,

  2. great project could send me the schematics to my email i want to see the project more detailed.

Comments are closed