PCF8575 I2C IO Expander

16-bit I/O expander, which you can add up to 8 of to a single I2C bus.

Hello World!

#include "mbed.h"
#include "PCF8575.h"

PCF8575 IO(p9, p10, 0x40);  // sda, scl, address
int var;                    // integer variable

int main() {
        IO.write(0xFFFF);   // All outputs goes high. 
        IO.write(0x00FF);   // Only the lower half goes high.
        wait(5);
        var = IO.read();    // Read the inputs on the PCF8575 to integer. 
}

/media/uploads/Lerche/pcf8575_connections.gif

Library

PCF8575 Library

Reference

PCF8575 Datasheet

PCF8575 Eagle library


Discussion topics

Nothing here yet!

Questions

Nothing here yet!