SCPA070 june 2023 TCAL6408 , TCAL6416 , TCAL9538 , TCAL9539 , TCAL9539-Q1
Latchable inputs are useful when the user wants to maintain that an interrupt is not lost during an input’s transition back to the original state. With latchable inputs disabled, a state change in the corresponding input pin generates an interrupt on /INT, and stores the input logic value into the corresponding bit of the input port register (registers 0 and 1). A read of the input register clears the interrupt flag. If the input goes back to the initial logic state before the input port register is read, then the interrupt flag on /INT clears itself which can cause issues because an interrupt can be lost if not read before the input state changes.
This behavior can be observed in the scope capture in Figure 4-1. Input P04 on the TCAL6416 is driven from a high to low logic state. After some time passes, the input is driven back to high. Note that the interrupt that was asserted to low goes back to high once the original input state on P04 is achieved. In this case, the interrupt is lost.
This situation changes when the latchable input is enabled. A change of state of the input generates an interrupt and the input logic value is loaded into the corresponding bit of the input port register (registers 0 and 1). A read of the input port register clears the interrupt flag on /INT. In this case, if the input port register is read after the input pin returns to the initial logic state, the interrupt flag on /INT does not clear, and the corresponding bit of the input port register keeps the logic value that initiated the interrupt. This process maintains that no triggered interrupt is lost due to a transition back to original state on the input pin. This behavior can be observed in the scope capture in Figure 4-2.
This behavior is a key difference between TCA devices and TCAL devices concerning the latchable input feature of Agile I/O’s.