Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PCF8574: PCF8574 Interface

Part Number: PCF8574
Other Parts Discussed in Thread: TCA9534, TCA9554

Hi,

I am Using PCF8574 I2C to IO expander for the expansion of ESP WROOM 32  controller GPIOs.

I have some queries regarding the usage of GPIOs  of PCF8574 as below,

1. How can I communicate from my controller to PCF8574?

2. Can I drive all the 8 GPIOs simultaneously for controlling peripherals.

Kindly requesting to reply as soon as possible. I am stuck in this. Attached the schematics.

Looking forward for the reply.

  • Hello Preethi,

    The PCF8574 is designed such that if you "write" to the device you are setting it as an output and depending on the bits (1=high and 0=low) you tell which IOs are high and low.  For example,

    Say you want to P7 to be high (1) and the other ports (P0 to P6) to be low (0), then you would send the following I2C command:


    So this is how you would write all IOs with the desired digital state (0 or 1).  Yes, you can program them to all be outputs. 

    Let me know if this isn't clear or if you have questions.

    -Francis Houde

  • Hello Sir,

    Thank you for the valuable information. 

    Sir, I have few more doubts,

    -  whether any pullup or pulldown is required while configuring the I/Os?

    - Can we use same I/O as input and output. I mean bidirectional without any change in design. In my application, I am using P0 for enabling/disabling RS485 IC ADM485. Will it work ?

    Regards,

    Preethi

  • Hello Preethi,

    This part is very limited in the sense that you must program all the IOs at once as either inputs or outputs.  You can't have combinations of inputs and outputs at the same time.  I would recommend using a newer part like the TCA9534 or TCA9554 (has internal pull up resistors), which have additional registers to configure each IO as either an input or output simultaneous.  They are also price competitive.

    -Francis Houde

  • Hello Sir,

    Thank you for suggesting new part. I will go with this new part.

    Further any queries related to this product I will get back to you.

    Thank you once again for your kind support.

    Regards,

    Preethi