Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 961 Bytes

PCF8574-IC.md

File metadata and controls

32 lines (24 loc) · 961 Bytes

Remote 8-bit I/O expander for I2C bus

Sensors That Use This IC

I2C Address

0x38..0x3F (configurable via input pins)

Usage

Register device:

echo pcf8574 0x38 > /sys/bus/i2c/devices/i2c-<port+2>/new_device

Finding device class node:

for chip in $(find /sys/class/gpio -name gpiochip*)
do
    if [[ "$(cat $chip/label)" == "pcf8547" ]]
    then
        # do whatever
    fi
done

Notes

  • GPIOs are active low. There is an attribute to set this if you manually export the GPIOs in sysfs.
  • kernel docs