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.

TCA9555: Default state of a TCA9555 port configured as output

Part Number: TCA9555
Other Parts Discussed in Thread: TMS320F28374S

My team is using the TCA9555 GPIO expander on a custom board, which is being controlled by a TMS320F28374S Delfino controller (on a different custom board) as the I2C master.

To test the I2C communication between this master-slave pair, I have written a few tests which configure the pins of Port 0 and Port 1 as below:

P0.0, P0.1 - input

P0,2 - P0.7 - output

P1.0 - P1.7 - output

1) Upon running only these configuration steps, I find that all the pins configured as outputs default to state 1 as soon as the ports are configured. Is this expected behavior?

2) There are a number of relays controlled by the GPIO expander on port pins configured as output. I don't want these turned on as soon as the ports are configured (as is happening). Is there any way to get the output port default states set to 0 upon configuration or can this only be done over a separate software command over I2C?

  • Ruta Bhave said:

    Part Number: TCA9555

    My team is using the TCA9555 GPIO expander on a custom board, which is being controlled by a TMS320F28374S Delfino controller (on a different custom board) as the I2C master.

    To test the I2C communication between this master-slave pair, I have written a few tests which configure the pins of Port 0 and Port 1 as below:

    P0.0, P0.1 - input

    P0,2 - P0.7 - output

    P1.0 - P1.7 - output

    1) Upon running only these configuration steps, I find that all the pins configured as outputs default to state 1 as soon as the ports are configured. Is this expected behavior?

    Table 5 of the datasheet shows the default states of the output registers. The output states are defined as 1's upon reset/start up.

    2) There are a number of relays controlled by the GPIO expander on port pins configured as output. I don't want these turned on as soon as the ports are configured (as is happening). Is there any way to get the output port default states set to 0 upon configuration or can this only be done over a separate software command over I2C?

    You can set the output registers to '0' and then configure the device's pins/ports to be an output.

    -Bobby

  • Thanks Bobby, this works. Could you please also let me know what the default state of the INT pin is? The custom board has a built -n 10 kiloOhm pullup to Vcc on the INT line. However when the custom board is powered on, the INT line is initially very near 0V. When 2 pins on the GPIO expander are configured via I2C command as inputs for push buttons, the INT line goes up near +5V, and then onwards I see the correct behavior as it gets asserted low on a button push. What should the state of the INT line be at power up?

  • Hey Ruta,

    The INT pin should be HIGH initially at start up (assuming your power rail on the 10k pull up resistor is powered) and the internal 100k pull up resistor should technically reference the I/Os to be all 'high.' If you are biasing the pins in someway after power up, the device could trip the INT circuitry. My guess would be that the internal pull ups are trying to pull the IOs high but you have some kind of external pull down which may be weaker than the pull up resistor. When the states get sampled at PoR they get sampled as a low(?) then when the power up is finished the state settles to a high(?). This would be one way you could accidentally trigger the INT circuitry (shown in figure 23). I would probably have to look at the schematic to see this may be what happened or if you probe the I/O pins while turning on the device to see if this occurred.

    You could also read the input registers after power up to clear the INT (even if there isn't one) so you can ensure the INT is (de-asserted) after power up.

    Thanks,

    -Bobby