The NXP PCF8574AT/3,518: A Comprehensive Guide to the 8-Bit I/O Expander for I2C-Bus Applications
In the world of embedded systems and IoT, microcontroller real estate is precious. The number of General-Purpose Input/Output (GPIO) pins is often limited, creating a significant design constraint. This is where I/O expanders become invaluable, and the NXP PCF8574AT/3,518 stands as a quintessential solution for extending the capabilities of a microcontroller via the ubiquitous I2C-bus.
Understanding the PCF8574AT/3,518
The PCF8574AT/3,518 is a monolithic CMOS integrated circuit that provides remote I/O expansion for most microcontroller families via the two-line bidirectional I2C-bus (serial clock - SCL, serial data - SDA). This device is part of a broader family, with the "AT/3,518" suffix denoting specific packaging (SO16) and tape-and-reel packaging for high-volume manufacturing.
Its core functionality is to add an additional eight quasi-bidirectional I/O pins to a system, all controlled through a simple two-wire serial interface. This dramatically reduces the number of GPIOs a main host controller (like an Arduino or Raspberry Pi) must dedicate to interfacing with sensors, switches, LEDs, and other peripherals.
Key Features and Operational Overview
1. Quasi-Bidirectional I/O Port:
The eight I/O pins (P0-P7) are configured as quasi-bidirectional. This means they can be used as either an input or an output without requiring a separate data direction register, simplifying software control. When used as an input, the pin is effectively high-impedance, allowing an external signal to easily drive it. As an output, it can sink a significant amount of current (typically up to 25 mA per pin), making it capable of driving LEDs directly.
2. Simple I2C-Bus Interface:
Communication is handled via the standard I2C protocol. The device features a programmable I2C-bus address, allowing up to eight PCF8574 devices to be connected to the same bus, theoretically expanding a single microcontroller by 64 I/O pins. The 7-bit address is set using the A0, A1, and A2 pins, providing flexibility in system design.
3. Interrupt Output:
A critical feature for efficient system operation is the interrupt (INT) output pin. This open-drain output pin goes active LOW when any input pin changes state. This allows the PCF8574 to alert the master microcontroller that an input needs servicing, eliminating the need for the master to continuously poll the device, thus saving processing power and bus bandwidth.
4. Low Power Consumption:
As a CMOS device, it features very low current consumption, making it ideal for battery-powered and energy-sensitive applications.
Typical Application Circuit
A basic connection diagram is straightforward:
SDA and SCL are connected to the corresponding pins on the microcontroller, each pulled up to VCC with a resistor (e.g., 4.7 kΩ).
VCC is connected to the system power supply (2.5V to 6V).

GND is connected to ground.
The I/O pins (P0-P7) are connected to external devices (e.g., buttons to ground for inputs, LEDs with series resistors to VCC for outputs).
The INT pin is connected to an interrupt-capable pin on the microcontroller (pulled up to VCC).
Address pins (A0, A1, A2) are tied to GND or VCC to set the unique device address.
Programming and Control
Software control is exceptionally simple. Data transfer is achieved by sending or receiving a single byte, where each bit represents the state of the corresponding I/O pin (Bit 0 = P0, Bit 1 = P1, etc.).
To set outputs: The master writes a single data byte to the device. A bit set to '0' will sink current (output LOW), while a bit set to '1' will act as a high-impedance output (effectively HIGH if pulled up externally).
To read inputs: The master reads a single data byte from the device. The value of each bit reflects the actual pin level. Before reading inputs, the corresponding bits must first be written as '1' (high-impedance state) to configure them as inputs.
Advantages and Considerations
Advantages:
Extreme simplicity of hardware design and software drivers.
Massive I/O expansion with minimal microcontroller pins (2 wires for virtually unlimited devices).
Interrupt generation for efficient input monitoring.
High current sink capability for driving LEDs directly.
Considerations:
Quasi-bidirectional nature means outputs are not strong drivers to VCC; they are better at sinking current than sourcing it.
Lack of internal pull-up resistors on I/O pins; they must be added externally if required for inputs.
Requires careful management of the I2C bus, especially when multiple devices are present.
ICGOODFIND: The NXP PCF8574AT/3,518 remains a cornerstone component for system designers seeking a straightforward, cost-effective, and reliable method to overcome GPIO limitations. Its elegant simplicity, combined with the power of the I2C-bus and interrupt functionality, makes it an enduringly popular choice for a vast array of applications, from industrial controls to consumer electronics.
Keywords: I2C-bus, GPIO Expander, Quasi-bidirectional, Remote I/O, Interrupt Output.
