Setup
5.5.2.1
Using the Key Press Matrix Display
Connect the TCA8418E-EVM and launch the GUI. The key press matrix display will only work when
KE_IEN (0x01, bit 0) is set to 1. By default, key event interrupts are enabled because KE_IEN (0x01, bit 0)
is set to 1 and the key press matrix display responds in real-time to key presses and releases. Press the
middle button (SW12) on the TCA8418E-EVM and observe the feedback from the display (
Figure 14. Key Press Matrix Display While Holding Down the Middle Button (SW12)
Releasing the key causes the grey box to become white again.
5.5.2.2
Main Configuration and Input Registers
Figure 15. Main Configuration and Input Register Display
The main configuration and input registers are the registers most likely to change while operating the
TCA8418E-EVM. For this reason, they are more prominent on the GUI.
The CFG register contains the interrupt enable bits for different types of interrupts.
The INT_STAT register contains the actual state of each type of interrupt.
The KEY_LCK_EC contains the lock status, can be written to lock the keypad, and counts the number of
key events (in the 4 least significant bits).
KEY_EVENT_A is the top of the first-in first-out (FIFO) stack that records key presses and releases.
KEY_EVENT_A is read automatically when KE_IEN = 1 and a key has been pressed or released.
Whenever one of these four registers is read, the main configuration and input register display updates to
show the newly read value of those registers.
The
Read registers 1-4 every second
checkbox causes the TCA8418E-EVM GUI to start a timer that will
read registers 1 through 4 every second. The read takes 100 ms. This feature shows how KEY_EVENT_A
and KEY_LCK_EC change every time the registers are read. Disable the KE_IEN bit before checking this
box; otherwise, nothing appears to occur in registers 3 and 4.
12
TCA8418E Keypad Scan EVM
SLVUAA2 – August 2014
Copyright © 2014, Texas Instruments Incorporated