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.

TCA6424A I2C setting

Other Parts Discussed in Thread: TCA6424A

Hi Sirs,

Sorry to bother you.

We have use TI TCA6424A, need check I2C setting.

If we setting I2C address is 22 (Hex)

How could we setting low at P01 (output port 01)??

Our step is 

1. Into I2C address 22(0x22)

2. Command byte register 0x84

3. The last data to register 0x00

Am i wrong??

Because we do that, the register to read is correct, but the output level always high.

So should we need config I/O state then to setting command byte?

Or could you teach us how to setting P01 to low??

Thanks for your reply

  • Hello Shu-Cheng,

    You were close to getting it correct.

    In order to change the output port mode, you must do 2 things:
    1) Write the state that you want the port to be (high or low) to the output register (for port P01, this would be register 0x84 or 0x04).
    2) Change the port from an output to an input (by default, all ports are inputs, which are hi-z). For port P01, this is register 0x8C or 0x0C.


    So, If we only want to change P01, and leave everything else in high z, we do the following.
    1) Command byte register 0x84 or 0x04 (either will work, because we aren't writing to sequential reigsters), write 0xFD afterwards, to put 0xFD into register 0x04.
    2) Change P01 to an output (I'm going to assume that you only want P01 to be an output, and the others all to be inputs still).
    You do this by writiting 0xFD to register 0x0C (or 0x8C, doesn't matter again).

    So let's go through the code you have to send to the device to make it work. I am going to assume you want to ONLY change P01 to an output low, and all other ports will be left as an input (high-z).

    <Start> I2C address (0x22) + write (0x44 is address + w); Command Byte (0x04); Data (0xFD); <stop> <start> I2C address + W (0x44); Command Byte (0x0C); Data (0xFD) <Stop>

    Your P01 should now be output low.