Let's Make Robots!

PCF8574 Remote 8-bit I/O expander for I2C-bus

Vendor's Description: 

If you're ever in need of additional digital inputs or outputs then this chip may be an answer to your prayers. It only requires two connections from your microcontroller (the I2C bus wires) and it provides you with 8 pins that can be configured individually to be input or output.

What's great about this chip is that if you need even more inputs or outputs you can just add another one of these without the need for extra connections to your microcontroller - I2C rocks! The hardware I2C slave address can be configured to any of 8 different addresses meaning you can have a total of 8 of these chips on the same I2C bus.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


I have some 7.1 digit-led's, but have never used them as it would take too many outputs, even when som other chips was put in front.

But as  I read it, I can just put one of these in front of every 7.1, and then control a whole row of these with just one out?

Halelulja, old-school-displays, here I come!!

/ Frits 

You only need to connect the I2C bus wire pins (SDA and SCL) of your microcontroller to each of the PFC8574 chips corresponding SDA and SCL pins and then you need some pull-up resistors on both the wires (I used 82k resistors for my LEGO compatible sensor).

This means you can control eight LED segments (plus any other I2C hardware not using the same fixed address prefix as the PCF8574) with just two pins on the microcontroller. By combining the segment drivers JKA mentioned with the PCF8574 chips, you can control as much as 32 LED segments so a scrolling effect would be in its place :-).

- Jimmy

You could do that... Or you could get yourself a handfull of 4511 chips. It's a display driver that can convert a 4-bit number to the signals a 7-segment display needs. It has build-in latches to keep digit on the display, even if you turn off or change the input. What you do is:

 Connect the 4-bit input of 4 4511s to bit 0-3. Bit 4-7 is connected to the EL inputs of the 4 chips, one for each input. You then do:

Set the first digit on pin 0-3, set bit 4 low and 5-7 high to turn EL low on the first chip and high on the other three.  This will make the first display show the digit. Then you turn bit 4 high. This will store the digit in the latches of the 4511. Then you select the next digit on bit 0-3, bit 5 low and 4,6,7 high. Then turn bit 5 high to store the second digit on the second display etc. Did this make sense? The bottom line is, that by using some external drivers, you can connect 4 displays to an 8-bit output, instead of just 1. Read about the 4511 here: http://www.doctronics.co.uk/pdf_files/4511.pdf

That's good to know. I just bought a few of those 4511's to let me drive digital displays, but I didn't realize that I don't even have to send signals to each one all the time. So you need a total of 4 pins + number of displays. That's an improvement, but it still seems like a lot. Still, I guess to get the pin usage even lower, you'd need to have something smarter in between, like that I2C chip.