PCF8574A is an 8-bit parallel I/O port expander with two-wire serial interface. This TWI peripheral interfaces to the master MCU via two wires. It's I/O pins model similar to the legacy 8051 one's. It operates from a 2.5 to 6 V DC supply voltage. An optional INT (interrupt) triggers an active low signal to the connected MCU pin whenever its digital input changes its logic state.
PCF8574A is similar to its precedence one's PCF8574. In the previous post, I use PIC12F629 to interfaces to PCF8574. However, PCF8574A has a difference reading and writing address, with 0x70 for writing and 0x71 for reading. I don't want to show its full details here.
In this example, the ATMega32 master TWI module reads the digital inputs from lower nibble of PCF8574A I/O. This lower nibble will be wrote back to the higher nibble of PCF8574A repeatedly.
A running example |
Embedded C source code list below.
Click here to download the zip file of this programming example.
See also
- Reading The Digital Input Output From PCF8574 Using PIC12F629
- PIC16F887 PCF8574 I2C Example using XC8
No comments:
Post a Comment