PIC18 LaurTec Library  3.0 Beta
Open Source C Library for PIC18 Microcontrollers based on C18 - XC8 Compilers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
PCF8574.h File Reference

Go to the source code of this file.

Functions

signed char PCF8574_write_data (unsigned char control, unsigned char data)
 
signed char PCF8574_read_data (unsigned char control, unsigned char *data)
 

Function Documentation

signed char PCF8574_read_data ( unsigned char  control,
unsigned char *  data 
)

This function reads to the data Port of the I2C I/O expander.

Parameters
controlIs the address of the PCF8574 (Internal Address + Pin address
dataAddress where the data is written into.
Returns
status 1: The byte has been properly written -1: Bus Collision error -2: Not Ack error condition -3: Write collision
Note
PCF8574 Address : 0100xxx0 PCF8574A Address : 0111xxx0

xxx = A2 A1 A0 (External Address Pins)

Definition at line 140 of file PCF8574.c.

signed char PCF8574_write_data ( unsigned char  control,
unsigned char  data 
)

This function writes to the data Port of the I2C I/O expander.

Parameters
controlIs the address of the PCF8574 (Internal Address + Pin address)
dataByte to write [min: 0, max: 255]
Returns
status 1: The byte has been properly written -1: Bus Collision error -2: Not Ack error condition -3: Write collision
Note
PCF8574 Address : 0100xxx0 PCF8574A Address : 0111xxx0

xxx = A2 A1 A0 (External Address Pins)

Definition at line 54 of file PCF8574.c.