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.

TCA9543A: software code controlling the device tca9543a

Part Number: TCA9543A

Hi Ti team,

Is there any demo code for TCA9543A which I can  reference.pls help to provide.

demo code in C language is prefered~

many thanks!

  • Hey Zhao,

    Unfortunately we do not have any example code to provide for you, however this post below may be able to help you understand what bits you need to send to be able to communicate with an I2C switch.

    A quick google search also showed an example of Arduino code example and may be helpful in trying to write code:

    This example specifically looks like it is coding to the switch in the first few lines.

    Thanks,

    -Bobby

  • Hi Bobby,

    Thanks for the info you've delivered.Two more things wanna check with you,for one thing what's the  address of control register(seems like only one control register can be used?);

    for another,while reading data if INT0/1 not used, what should software do to get nofified when data reading's read? just by pooling control register bit4&5 ?

    thanks!.

  • Hey Zhao,

    "what's the  address of control register(seems like only one control register can be used?)"

    -Because there is only one register, you do not need to send a control register address. Figures 12 and 13 show you only need to send the address of the device and specify whether you need to read or write to the device. With a read, you will immediately get the data sent to you from the device after the ACK. For a write, you will just have to write the 8 bits you need after you get the ACK.

    "while reading data if INT0/1 not used, what should software do to get nofified when data reading's read? just by pooling control register bit4&5 ?"

    -I'm not sure I fully understand the question here. If you are not using INT0/1 then you can just ignore bit 4 and 5 when you read. In software, bit 4 and 5 will just be don't care terms. You will know that the software has read the data because the device will ACK after you send the slave address and read bit then send 8 bits of data. You basically only care about bits 0 and 1 which tell you the channels that are enabled.

    Thanks,

    -Bobby

  • Hi bobby,

    Thanks for your reply.According to your info,I gotta change i2c API invoked.
    Indeed ,as you mentioned,INT0/1 are not used in our scheme.We just utilize I2C switch to avoid address confliction.
    Regards!