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.

TCA6416A: Read from the device register

Part Number: TCA6416A

The Datasheet says to read a register you need to send Start-I2CAddress With Last bit 0-RegisterAddress-RepeartedStart-I2CAddress With Last bit 1 then you will receive the data from the RegisterAddress. Now since we are first sending Adress with 0 as last bit, we are trying to write, but what should be the value that needs to be written. Datasheet claims that after a restart we can read the Reister Address. Does that mean you need to reset the device? 

  • Hi Sparsh,

    You are right that the first byte transfer will be the device address with R/W bit set low.  The next byte transfer would be what the datasheet calls the "command byte," which could be thought of as an internal register address.  You can see a listing of different command bytes in Table 5 of the datasheet.  After that, if you want to write to the register you can continue on with another byte transfer of the data to be written.  If instead you want to read, then you would issue another I2C start command and re-send the slave address with the R/W bit high.

    Figures 29 through 32 in the datasheet illustrate this for a few example commands, so they may be useful for you to reference.

    Please let us know if you have any further questions.

    Regards,
    Max