OT: PCA9555 16-bit I2C I/O Expander


Senior Member
When folks need more I/O, the most common solution seems to be the 74xx595 shift register. For applications that need to drive a lot of LEDs, the MAX7219 is often the chip of choice.

I might have found something better - the NXP (and TI) PCA9555 I/O expander.

This chip provides 16 bidirectional I/O lines and is driven by the I2C bus. You can parallel up to 8 of these chips on one I2C bus, providing up to 128 bidirectional I/O lines.

You can find the data sheet here: http://www.nxp.com/acrobat_download/datasheets/PCA9555_7.pdf

Some benefits:

1. It's inexpensive. USD $1.55 from Mouser in either DIP or SOT packaging.

2. It adds bi-directional I/O to Picaxe chips that either don't provide bi-directional ports, or not enough bi-directional ports for your application.

3. For LED driving applications, it's much cheaper to use one (or more) of these than it is to use MAX7219 chips.

4. Outputs can source or sink 50 milliamps.

5. Provides an interrupt-on-change function.

6. Built-in pullup resistors on all pins configured as inputs. (While normally desirable, this might create a problem for some designs. Use "naked" Picaxe ports for such cases.)

7. Still being manufactured in a through-hole package!

8. Works in 5 volt systems.

Note that there are I2C I/O expanders by various manufacturers available in both 8 and 16-bit configurations. Google for more information.

In general, I think that most designs would be better implemented using an I2C I/O expander rather than a -595 or -7219 solution.

Have fun!

Last edited:


Senior Member
Similar to the Microchip MCP23016/7 (17 being preferred - faster and cleaner layout).

MCP23017 DIP is 300mil DIP and has more features where PCA9555 DIP is 600mil


Senior Member
Thanks, BCJ. I wasn't aware of that Microchip part.

I agree that it's a better chip than the PCA9555:

- SDIP saves board real estate

- two int outputs vs a single for the -9555

- configurable weak pullups

- high speed I2C clocking supported

I'll order a few of these on my next Microchip order.

Nice work!


PS - Here's the datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21952a.pdf


Darn, I was hoping to 'pencil' something into my schedule, then 'firm up' next week and have 'cerebral discussions' on 'blue sky thinking' - that was genuinely from a Quinetiq end-of-meeting conversation. Hey they slipped up, they didn't get 'sustainable' in!


Senior Member
Marketing meeting ? "User-focused fulfilment analysis" surely :)

I actually like "Blue Sky Research" ( it, and the term ) because that really does describe what it is; lying on one's back staring into the sky and trying to think up something interesting, alternative or novel.

Where would we be without philosophers idling in baths, chemists day-dreaming of snakes eating their tails, and physicists wondering why birds don't fall out the sky or why an apple hit their bonce. Ever picked up a tin of Spam and thought ...


Senior Member
just noticed the 50ma in your post.

The specs on these things need careful study. A lot depends on how many ports will be active at the same time.
For the MCP23017;
Total power dissipation 700 mW
Maximum current out of VSS pin 150 mA
Maximum current into VDD pin 125 mA
Maximum output current sunk by any output pin 25 mA
Maximum output current sourced by any output pin 25 mA
plus a few others.

For the PCA9555 they seem a bit better except for input current and total power dissipation.
output current on an I/O pin - ±50 mA
input current - ±20 mA
supply current - 160 mA
ground supply current - 200 mA
total power dissipation - 200 mW

My application involves sinking LED current into the device and have examples of configuration/use of the MCP23016 & 7 for this purpose if you need it.


Senior Member

Yes, I'm well aware of that. I was just hitting the high points in my post, not trying to copy the whole data sheet.




New Member
I've been using the PCA 9532 LED dimmers. One can run five RGB LEDs quite nicely, and the inbuilt PWM/flashing means that all the intensity control can be handed off from the Picaxe to the eight 9532s sitting on the i2c bus. This should let one Picaxe control brightness on 128 LEDs, with very little overhead in the Picaxe itself.

The main problem I've found is that there's only two PWM levels, so if you're after true colour control over R,G and B, then you can't. You can cheat by pushing the saturation of any one colour to fully on, letting you produce any hue in the RGB colourspace, but you can't then dim that colour.

Of course, you can still get any hue and intensity in the red-green, or red-cyan colourspaces, and so on, just not all of RGB. Out of the possible 16 million colours, you can only access 384,000, which should be enough for most people.