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.
        var = IO.read();    // Read the inputs on the PCF8575 to integer. 



PCF8575 Library


PCF8575 Datasheet

PCF8575 Eagle library