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.

TCA8418: Constantly/Continually key press information

Part Number: TCA8418


Hello team, we are using the TCA8418 in our system and it’s working well.

But…can someone tell us if it is possible hold a key for a wile and receive information that the key is held down.

I do not want to know when the key is released, that wont help because we need to repeat a character.

Appreciate you sharing your experience with us!

  • Hi David,

    I can't think of an easy way for a Master device to tell if a key is being held for a certain amount of time without poling TCA8418. Because there is no key being pressed or GPI changing state, the Slave will not generate an interrupt for the Master to check. A not-so-elegant way to do this would be to immediately read and clear the interrupt from the first button press and have the Master time until the following release interrupt is seen. I'm not sure if this is what you were going for.

    Could you describe what you are trying to do in more detail? I hope I can recommend a better method than this.

    Regards,

    Eric

  • Hi Eric,

    Thanks for the quick response.

    We are using the decoder with only 4 keys for programming our system like Date Time and so on (Start, Plus, Minus and Enter).

    The Enter key is used as a “Next Position” and “Store” key. When we hold the Enter key, after about 3 seconds, the system must store the newly adjusted information in the CPU Memory with a signal.

    After the signal, the user understands that the information was stored and can release the Enter key.

    The main problem is that the key decoder gives us an Interrupt signal only when a change is maid.

    Actually, just a simple Auto-repeat function like all standard keyboards have would help.

  • Hey David,

    It sounds like you may be able to do sense whether the button has been pressed for 3 seconds from a software perspective. You could do this by first seeing that the enter key has been pressed, then your processor would wait about 3 seconds before checking to see if the enter button was ever released.

    Our device does not have a function to repopulate the same key press event into the event FIFO like what you are needing.

    How much control do you have on the design? I'm wondering if we can add additional components (a resistor, capacitor, and a FET) and tie that to one of the unused rows/columns of our keypad to generate an interrupt on a rising/falling edge to signal the processor that an INT occured again and that it was a long press of the enter key. The resistor and capacitor would form an RC circuit which would correlate to about 3 seconds of button pressing detection.

    Thanks,

    -Bobby

  • Hi Bobby,

    As I understand, there is no internal possibility to repeat the INT output signal while holding a key pressed, because we get an INT only every change (press/release).

    So what we will try to do is, start a timer (CPU Software) after every Key-Press-Interrupt occurs.

    • If a Release-Interrupt occurs within 2 seconds, it will be recognized as a normal key usage.
    • If a Release-Interrupt occurs after 2 seconds, it will be recognized as a continues-pressed-key. After our signal-tone we wait for the release-Interrupt. The key is ready for use again.

    We didn’t want to waist a CPU timer on this, but because 460 boards are being produced already, we have no alternative.

    I will keep you informed about the results.

    Thanks again

    David