4 Replies Latest reply on Jun 27, 2018 5:49 PM by RodolfoG_11

    CY8C4245AXI-473 software I2C



      I am using 2 UARTS, so that I have no I2C left over. I willl  emulate I2C with control registers and status registers.

      Do I need to use 2 externally onnected input and output pins pin or can I use a bidirectial pin for this purpose?

      Thanks for input!

        • 1. Re: CY8C4245AXI-473 software I2C

          I2C standard specifies two separate lines for Input/Output. You will want to have two separate external pins to get it to work. There are chips that communicate over 1 pin, but it is not I2C standard.

          If you really need to reduce the pin usage to one wire, something like this: https://datasheets.maximintegrated.com/en/ds/DS28E17.pdf

          would be your best bet.

          • 2. Re: CY8C4245AXI-473 software I2C

            Hi e.pratt,


            thanks for your answer. My question was not clear enough.

            It is clear to me that I will need a SCL and a SDA per I2C.

            The question was about how to use the same pin as input and output.


            What was not clear to me is how I can use ONE pin simultaneously as input and output.

            Up to now I have always uses control registers and status registers connected to pins.

            I think it is not possible to connect one pin to a control register AND to a status register.


            Now I found out that I can use a bidirectional pin and use the API of the pin directly

            without status or control register - certainly 2 bidirectional pins for each I2C.

            • 3. Re: CY8C4245AXI-473 software I2C

              You can runtime-modify the drive mode of the pins to support Input/Output. Thus, you can switch and use a single pin as both input/output by changing the mode and settings during runtime based on your current directional support.

              The datasheet/documentation within PSoC Creator IDE for the Pin Component should have all the information you need to set the input/output modes of the pin at runtime.

              Just configure the drive mode using software when you want to switch the mode. (High-z for input, strong drive or pull up/down for output).

              • 4. Re: CY8C4245AXI-473 software I2C



                I have just uploaded a software implementation of the I2C Master component.


                Software I2C Master Component for PSoC 3/4/5


                I hope this can be useful for some.