Online Development Notebook > Index > U4x1 Application Notes > App14: 2-Wire to PCF8574

App14: 2-Wire to PCF8574


Purpose

Provide an example to interface the PCF8574 to a U401⁄U421⁄U451. The PCF8574 is an 8-bit I⁄O expander that can connect to the 2-wire bus of the U4x1. Since eight of these devices can be added to the 2-wire bus, the number of inputs or outputs of a single U4x1 can be expanded by eight devices with eight I⁄O lines, or 64 lines total.

Description

The 2-wire capabilities of the U4x1 allows it to interface to the Philips I2CTM devices. The two 2-wire commands can be used together to provide the signaling needed to conform to the signalling needed for the I2C protocol. The 2-wire bus of the U4x1 consists of two open-drain signal lines from port A (or port zero if you want to call it that). Specifically PA.3 is the 2-wire data line, while PA.2 is the 2-wire clock line.

This application example expands the number of output lines of the U4x1 by eight by using a single PCF8574.

Hardware

Below is a schematic appropriate for this app note. The circuit uses the two 2-wire lines of the U4x1 (in this case a U421) to control a PCF8574. The PCF8574 will be used as output port expansion in this case. All eight output lines of the PCF8574 directly drive LEDs.

The three address lines of the PCF8574 are tied to ground, making the device address 000 in binary. Since the 2-wire bus is an open-drain bus, two 4.7 kohm resistors pulls the lines to 5V. The clock and data lines of the 2-wire bus will either pull the line low, or will float open allowing the resistor to pull the line high.

For more information on the PCF8574 and on the other Philips I2CTM devices that the 2-wire interface can drive, pleas do a big old Google search. There are a LOT of different I2C devices, and a lot of information on the web about this type of 2-wire protocol.

 

 

Expanded Hardware

Below is a schematic of the same type of system, but it uses three PCF8574 devices. Each of the three devices has a different address, set by the lines A0, A1, and A2.

 


Hardware:  U401 USB Interface    U421 USB Interface   U451 USB Interface

Programming:  USBm DLL Programming    Download Files

Application Notes:  U4x1 Application Notes    Misc Applications and Information    FAQ

While every effort has been made to make sure that the information posted on this site is correct, the author can not be held liable for any damages whatsoever for losses as a result of the application of this information. Use this information at your own risk.

USBmicro can design your custom and semi-custom USB product. Email about USB design can be directed to " Robert " at usbmicro.com.

Copyright © USBmicro, L.L.C., 2002-2010

Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 109 of 126)

This page is created with TreePad