4 Replies Latest reply on Feb 13, 2019 5:12 AM by BragadeeshV_41

    I2C problems with PSoC 5LP and CY8C9560A port expander

    EuGe_296116

      I have a design with a PSoC 5LP and two CY8C9560C port expanders.  One of them has A0 grounded and the other one has it tied to +5V, which give I2C addresses of 0x20 and 0x21, respectively.

       

      SCL and SDA have the correct pullups and I have no trouble communicating with other devices on the same I2C bus.

       

      When I try to write to either of the expanders, they don't respond:

      Oddly enough, 15ms later, both SDA and SCL get set low (and the PSoC isn't attempting any more I2C transactions; I currently have it sitting in and endless loop after the first one) and then high again 70ms later:

       

      Anyone have any ideas as to what's going on here?

       

      Thanks.

        • 1. Re: I2C problems with PSoC 5LP and CY8C9560A port expander
          BragadeeshV_41

          Hi ,

           

          Could you please provide a complete scope shot of the bus. From start till the stop condition.

           

          Also what is the pull up/ pull down resistor value you have used for A0?

           

          Because when A0 uses a strong pull up/ strong pull down (wired through 330 or less resistor to Vdd or Vss), only A0 is used for device slave addressing.

           

          But when A0 has a weak pull up or pull down (connected to Vdd or Vss through 75K- 200K ohm resistor), A1 will also be used for slave addressing. This might have changed the slave address value and maybe that's why the slave NACKed. Please confirm.

           

          Also in general, it is not recommended to share pull up/down resistors between multiple devices.

           

          Also let us know if you are trying to access the access the multi port device or the EEPROM. Addressing format varies in that case also.

           

          Regards,

          Bragadeesh

          • 2. Re: I2C problems with PSoC 5LP and CY8C9560A port expander
            EuGe_296116

            - I've provided the entire trace.  What exactly do you think is missing from it?

            - As I said in the original post, A0 is grounded for one device and tied to ground on the other device.  This means that the "resistor value" is 0.

            - As I said in the original post, the addressing scheme I'm using gives addresses of 0x20 and 0x21.  This means that I'm trying to access the multi-port device (as seen in the logic trace) and not the EEPROM.

            • 3. Re: I2C problems with PSoC 5LP and CY8C9560A port expander
              EuGe_296116

              I've figured out the problem.  If I insert a long enough delay on startup, it starts working.  What is the minimum time between power being applied to the CY8C9560A and starting I2C communication with it?  I can't find this documented anywhere in the datasheet.

              • 4. Re: I2C problems with PSoC 5LP and CY8C9560A port expander
                BragadeeshV_41

                Hi,

                 

                You will need 400 ms after power up to start an I2C transaction with the CY8C9560A device.

                 

                Regards,

                Bragadeesh