Re: Read 8 buttons and drive 8 leds - PCF8574

You can use the same lines to drive the LEDs and read the buttons. Most of the time the lines are drving the LEDs. When you want to scan the buttons, switch the line to an input, read it, and switch it back to an output. If the LED is off for a milisecond, your eye will never see it.