This module (HCMODU0120) is a breakout board for the PCF8574 8-bit input/output (I/O) expander IC. Using this module you can expand the available digital I/O pins of your microcontroller via its serial I2C interface. The device features an 8-bit quasi-bidirectional I/O port (P0–P7), including latched outputs with high current drive capability for directly driving LEDs. Each quasi-bidirectional I/O can be used as an input or output without the use of a data-direction control signal.

3 On-board jumpers allow selection of up to 8x I2C addresses meaning that up to 8 modules (64 I/O pins) can be connected to same I2C interface. The module also features convenient input and output headers at each end so that additional modules can simply be daisy-chained without the need for additional wires etc.

If you intend to use this module with a standard Arduino board please don't forget to download our exclusive HCPCF8574 library and example sketches which are fully compatible with this module. The library can be downloaded from the software section of our support forum here:

This example sketch uses the HCPCF8574 library to toggle one of the PCF8574's digital pinsemulating the standard Arduino 'blink' sketch. This sketch has been written specifically forthe Hobby Components PCF8574 I2C to 8-bit digital port expander (HCMODU0120). To use the sketch change the I2C_ADD to match the address of your device (default is 0x38 for HCMODU0120)and connect and LED (via a current limiting resistor) to the PCF8574's digital pin 0 (markedD0 on HCMODU0120). You can connect your Arduino to the module as follows:

More information about the library can be found in the software section of our support forum here:

http://forum.hobbycomponents.com/software

You may copy, alter and reuse this code in any way you like, but please leavereference to HobbyComponents.com in your comments if you redistribute this code.This software may not be used directly for the purpose of selling products thatdirectly compete with Hobby Components Ltd's own range of products.THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANYREASON WHATSOEVER.*/

#include "HCPCF8574.h" //Include the HCPCF8574 library

#define I2C_ADD 0x38 //I2C address of the PCF8574

HCPCF8574 Port(I2C_ADD); //Create an instance of the library

void setup() { Port.init(); //Initiliase the PCF8574 (all pins are set to high)

HCPCF8574 Arduino library for the above sketch is available for download from the software section of our support forum here:

[LINK TBA]

Diagrams, libraries, and example code are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum