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.

TCA6418E: Please let me know if I can directly read IO status (high or low) from TCA6418E IIC interface

Part Number: TCA6418E

HI Sir,

I saw following descriptions in your TCA6418E datasheet, in page 14,

GPIO Data Status Registers, GPIO_DAT_STAT1–3 (Address 0×14–0×16)
These registers show GPIO state when read for inputs and outputs.

and in page 12, it also mentioned read twice to clear.

Does it mean I can directly read GPIO power level (high or low) from these registers right after TCA6418E powers on?  The reason why I ask this question is that I will connect the IO to a reed switch, and I will configure it as an input. If the reed switch is on, the IO will be connected to GND directly, and if the reed switch is off, the IO will be forced to pull high. If the reed switch has beed turned on before TCA6418E powers on, how can I figure out the status of the reed switch? Does GPIO_DAT_STAT1-3 contains the power level information? If I read twice, when will the register be written again?

  • Hi Joe,

    For this device, you can read the initial input port values (i.e., after power-on) only with debouncing disabled. If debouncing is enabled, a change of state needs to be detected (and held for a debounce filter duration) before the input state is latched into the registers. (After reading the initial values, though, it would be OK to re-enable debouncing.)

    Regards,
    Max