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: Generating an interrupt on the IO-EXPANDER-EVM populated with TCA9555

Part Number: TCA9555
Other Parts Discussed in Thread: IO-EXPANDER-EVM, TCA8418E, TCA8418

I am using a TCA9555 as one of the slave devices on my I2C bus.

It has been set up on the IO-EXPANDER-EVM by removing the part that it comes populated with. I am trying to generate an interrupt on pin 1 of the TCA9555 using the breakout pin provided on the EVM. 

To do this, I have built a temporary circuit on a breadboard, which pulls up the breakout pin to +5V using a 2k Ohm pullup resistor.

I configured port 0 as an input (writing all 1s to the Config0 register). I changed the jumper position on J12 from out to IN.

I am polling the IO Expander port 0 once a second. Should a button press on S3 using this configuration assert the INT pin low?

  • Hi Ruta,

    Yes, I would expect a change of state on an input port to generate an interrupt. The INT line should assert when the value changes from a previously-read value and will clear either upon the ACK bit following a read of the input port register upon the input toggling back to its previously-read state.

    Are you not seeing any interrupts indicated? Are you able to properly read both high and low states of the input port via the input port register? If not, can you verify that you are forcing high and low voltages at the correct input pin as expected?

    Regards,
    Max
  • Thanks for your reply, Max.

    I am checking the behavior of the INT line using a scope and it remains high indicating an interrupt was not asserted.

    I believe I am going wrong somewhere in the steps to generate the interrupt.

    I configured Port 0 as an input by writing all 1s (0xFF) to the config 0 register (command byte 0x06).

    Then I issued read commands continuously in a one-second loop to read the input port 0 registers (command byte 0x00)

    What is the default state of the input pins upon power up? This is the result I observed with a logic analyzer:

    1) Default state is read as 0x13 [00010011]
    2) When S3 is pressed, the state read is 0x11 [00010001]
    3) When S4 is pressed, the state read is 0x12 [00010010]
    4) When S3 and S4 are pressed together, the state read is 0x10 [00010000]

    When any pressed switch is released the reading reverts back to 0x13.

    However, on none of these transitions do I see the INT pin pulled low (it remains high throughout).

    What is the behavior expected in this case? Also what is the default state of the input pins upon powerup?

    Please let me know where I am going wrong.
  • Hey Ruta,

    The INT logic of this device does not latch. There are two conditions that will reset the INT pin, the first is if the previous state is restored (if an input was high and then goes low but then goes high again). The second is if the you perform a read, in this condition what ever the read values are, they are remembered by the device and is used as the 'previous state' as I mentioned earlier.

    Are you able to look on an o-scope and observe the INT pin go low when you press a button but before you do a read?

    "Also what is the default state of the input pins upon powerup?"
    I believe the default 'previous state' of the input pins are high if you have pull up resistors or low if you have pull down resistors. Performing a read would clear this and provide you with a known 'previous value'.

    Lastly, what is the pull up strength on the INT pin?

    Thanks,
    -Bobby
  • TRX Bobby said:
    Hey Ruta,

    The INT logic of this device does not latch. There are two conditions that will reset the INT pin, the first is if the previous state is restored (if an input was high and then goes low but then goes high again). The second is if the you perform a read, in this condition what ever the read values are, they are remembered by the device and is used as the 'previous state' as I mentioned earlier.

    Are you able to look on an o-scope and observe the INT pin go low when you press a button but before you do a read

    Hi Bobby, thanks for your reply. I can't see the INT pin go low when I press a button and in between reads.

    TRX Bobby said:


    "Also what is the default state of the input pins upon powerup?"
    I believe the default 'previous state' of the input pins are high if you have pull up resistors or low if you have pull down resistors. Performing a read would clear this and provide you with a known 'previous value'.

    Lastly, what is the pull up strength on the INT pin?

    I am using the TCA9555 on the IO Expander EVM (repopulated after removing the original part). I do not have any pull-ups or pull downs for the input pins on my breadboard.

    The pullup strength on the INT pin is a 2 kilo Ohm pull up resistor to +5V (which is also what I'm supplying at J1 Vcc on the EVM).

  • Hey Ruta,


    "I do not have any pull-ups or pull downs for the input pins on my breadboard."
    TCA9555 has internal pull ups so that shouldn't be a problem.

    I assume when you press a switch, you have your switch tied to GND?

    Is J10 unpopulated?

    Can you provide scopeshots of when you press a button and the INT pin?
    What happens if you reset the device and try? Device does not have a reset pin... Ignore this
    Are you able to provide the I2C interaction on an oscope?

    Thanks,
    -Bobby

  • Thanks for your reply Bobby,

    I had left J10 unpopulated and J12 and J11 were set to IN instead of out.

    The error turned out to be with my INT pull up configuration. I used the correct pullup and was able to see the INT line dip low on a button press.

    It then returned to +5V after the new value was read from the device.

    Incidentally, when the button is pressed down for a long time and then released, INT is also asserted on the rising edge change on the input port. Is there a way to configure the interrupt to trigger on either rising edge or falling edge of the input port?

  • Hey Ruta,

    Glad to hear you were able to fix the INT problem.

    " Is there a way to configure the interrupt to trigger on either rising edge or falling edge of the input port?"
    Not on this device (or most our IO expanders). TCA8418/TCA8418E will likely be a better pick for something like that. You can set that device as a GPI and then set it to only INT on rising/falling edges. Or you could use it as a keypad like what it sounds like you are doing. You could also use keypad and GPOs with this device if you need.

    Thanks,
    -Bobby
  • Thanks Bobby, much appreciated