Anobium - 2015-06-19

I have just published a revised driver the PCF8574 device. This driver supports the 8-bit quasi-bidirectional port via an I2C-bus interface. The PCF8574 has a low current consumption and includes latched outputs with high current drive capability for directly or sinking driving LEDs. It also possesses an interrupt line (INT) which can be connected to the interrupt logic of the microcontroller. By sending an interrupt signal on this line, the remote I/O can inform the microcontroller if there is incoming data on its ports without having to communicate via the I2C-bus.
This means that the PCF8574 can remain a simple slave device.

I have posted a new driver and an associated demonstration program for GCGB and GCB. There was a driver release in the March 2015 Hot Release pack but this actually should not have been included and did not work - sorry.

The demo program shows how the I2C bus can be used to extend the number of IO lines. The demonstration shows four LEDs attached to bit0, bit1, bit2 and bit3 of the PCF8574. The LEDs are attached via a suitable resistor. The PCF8474 is sinking the current from the LEDS. Also, it shows reading the status of four switches attached bit4, bit5, bit6 and bit7 of the device, they are pulled high via a suitable resistor. The demonstration also shows how pressing a switch raises an event within the PCF8574 and this is passed to the microcontroller for handling. This uses a microprocessor interrupt to support this type event.

For the driver see here

For the demo file see here

 

Last edit: Anobium 2015-06-21