Wednesday, January 22, 2025

Library for PCF8574 I/O expander for AVR

The PCF8574 is an 8-bit I/O expander integrated circuit that provides an additional 8-bit I/O port that can be controlled via I2C. This allows a micro-controller to access and control more I/O pins than it would have available on its own. It can be used in projects that require lots of pins such as LED displays or button matrices. The operating voltage range is: 2.5V to 6.0V.

The advantages over a classical shift register is that it can also read the pins and with the use of the INT (interrupt) pin, the micro-controller can be notified when another device starts sending data.

Since this IC is used in the PCF8574 backpack for the alphanumeric LCD modules, I've decided to make a library for it.