PCF85748-bit quasi-bidirectional I²C I/O expander
Add eight simple I/O lines through a two-wire bus.
PCF8574 adds eight quasi-bidirectional I/O lines to a standard-mode I²C bus. A controller reads or writes one port byte directly after the device address; there is no direction register or register-address byte. Three hardware address pins allow eight PCF8574 devices on one bus. Writing a port bit LOW turns on its sink driver. Writing it HIGH releases the pin with a weak current-source pull-up, allowing an external switch or device to pull it LOW for input use. All port bits start HIGH after power-on, and software must keep input bits HIGH in every subsequent output write. The example uses one port bit to sink a current-limited LED and another to read a grounded pushbutton. An open-drain interrupt reports input changes. The expander, controller and pull-ups share a 5 V logic domain; using another controller voltage requires a compatible supply choice or suitable level translation.

