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.

TCA9535 I2C Expander read error

Other Parts Discussed in Thread: TCA9535, TCA6416A

Hi,

I am not able to prob (i2c detect) , that is I am not able to do a initial read to detect the presence of this device at particular address . Whenever I do so I get an error of REMOTE i/o  . But when I first write to 0x07 and 0x6 registers of TCA9535 and make it output and then read the device , Its getting successfully read. 

I want to know why I am not able to read the device before the write to detect the presence of the device.

Has anyone experienced the same issue?

  • Moving to I2C forum for support.

    -Ryan

  • Hello Manoj,

    Could you explain what it is you're trying to do in order?

    When you try to read, the device uses the previous register you had written to as the source of the read, but I'm not sure of what you're doing.
  • Hello Jonathan,

    Thanks for replying .

    Well, I am trying to write a driver code for this device. The aim is that, I should first detect the device for its presence , afterwards I should write into the registers of TCA and make the two ports as output and send out some some Enable signals to activate devices connected to the output ports. My device is having a address of 0x20. So whenever I do a first read to this device for checking if the device is present or not . I always get an I/O Error . But if I read after doing the write operation , the read works.The device is not giving ack signal for the read.

    I have read through datasheet It says that by default all ports act like input after powering up.Do I have to do any configuration for reading the presence of device.?? 
    Thanks in advance..
  • Hello,

    The behavior you are experiencing is normal. Please see the datasheet, section 9.6.4.2 Reads on page 23.

    In short: The bus master must first send the TCA6416A address with the LSB set to a logic 0 (write instead of read), the command byte is sent after the address and determines which register is accessed.

    The device will not acknowledge a read request when the address of the register to read has not been supplied yet.