maxint-rd / mxUnifiedPCF8574

mxUnifiedIO expander library for Arduino. Use device specific drivers with PCF8574/PCF8575 I/O expanders using a unified API.
4 stars 2 forks source link

mxUnifiedPCF8574 / mxUnifiedPCF8575

mxUnifiedIO child library for Arduino. Use device specific drivers with PCF8574/PCF8575 I2C I/O expanders using a unified API.

This library (Arduino IDE version 1.6 and higher) is a child library of the mxUnifiedIO library. It provides a unified API to drive PCF8574, PCF8574A and PCF8575 I2C I/O expanders via the dedicated I2C SDA/SCL or (on ESP826) using selected pins.

By using this library, setting a pin of the shift-register is as easy as calling Arduino's digitalWrite(). The library implements shiftOut() to allow device specific drivers using the expanded pins of the I/O expander to be used as easy as those on the MCU.

Connections and Pinout

Please note that the pins on the PCF8574 and PCF8575 are intended to be used for data. They cannot deliver much current. When connecting LEDs to the pins, they may not light up very brightly.

The LCD backpack module features a PCF8574 chip. To drive the LCD backlight LEDs with sufficient current, it uses a transistor. See the pinout of the module below:

PCF8574 I2C LCD driver backpack module pinout

     +---------------------+
-SCL-+   ::: +---+         |
-SCA-+   +-+ |PCF| ''': LED+-
-VCC-+   |*| |   |  ..- jmp+-
-GND-+   +-+ +---+         |
     +---------------------+
        1234567890123456
        ||||||||||||||||

Pin Description
 1  GND
 2  VCC
 3  Contrast (adjustable VCC->Pot->Pin3)
 4  P0
 5  P1
 6  P2
 7  not connected
 8  not connected
 9  not connected
10  not connected
11  P4
12  P5
13  P6
14  P7
15  VCC (for LED)
16  P3 (connected via LED jumper to J3Y (=S8050) transistor, sink)

Troubleshooting tips

For reference

Features & limitations

Disclaimer