English
Language : 

TCA8418E_15 Datasheet, PDF (16/50 Pages) Texas Instruments – I2C Controlled Keypad Scan IC With Integrated ESD Protection
TCA8418E
SCPS222C – MAY 2010 – REVISED OCTOBER 2015
Table 1. Key Event Table (Keypad Array)
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
R0 1 2
3
45
6
7
8
9 10
R1 11 12 13 14 15 16 17 18 19 20
R2 21 22 23 24 25 26 27 28 29 30
R3 31 32 33 34 35 36 37 38 39 40
R4 41 42 43 44 45 46 47 48 49 50
R5 51 52 53 54 55 56 57 58 59 60
R6 61 62 63 64 65 66 67 68 69 70
R7 71 72 73 74 75 76 77 78 79 80
www.ti.com
Table 2. Key Event Table (Row GPI Events)
R0
R1
R2
R3
R4
R5
R6
R7
97
98
99
100
101
102
103
104
Table 3. Key Event Table (Column GPI Events)
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
105
106
107
108
109
110
111
112
113
114
8.3.1.2 General Purpose Input (GPI) Events
A column or row configured as GPI can be programmed to be part of the Key Event Table, hence becomes also
capable of generating Key Event Interrupt. A Key Event Interrupt caused by a GPI follow the same process flow
as a Key Event Interrupt caused by a Key press.
GPIs configured as part of the Key Event Table allows for single key switches to be monitored as well as other
GPI interrupts. As part of the Event Table, GPIs are represented with decimal value of 97 and run through
decimal value of 114. R0-R7 are represented by 97-104 and C0-C9 are represented by 105-114
For a GPI that is set as active high, and is enabled in the Key Event Table, the state-machine will add an event
to the event count and event table whenever that GPI goes high. If the GPI is set to active low, a transition from
high to low will be considered a press and will also be added to the event count and event table. Once the
interrupt state has been met, the state machine will internally set an interrupt for the opposite state programmed
in the register to avoid polling for the released state, hence saving current. Once the released state is achieved,
it will add it to the event table. The press and release will still be indicated by bit 7 in the event register.
The GPI Events can also be used as unlocked sequences. When the GPI_EM bit is set, GPI events will not be
tracked when the keypad is locked. GPI_EM bit must be cleared for the GPI events to be tracked in the event
counter and table when the keypad is locked.
8.3.1.3 Key Event (FIFO) Reading
The TCA8418E has a 10-byte event FIFO, which stores any key presses or releases which have been
configured to be added to the Key Event Table. All ROWs and COLs added to the keypad matrix via the
KP_GPIO1-3 Registers will have any key pad events added to the FIFO. Any GPIs configured with a 1 in the
GPI_EM1-3 Registers will also be part of the event FIFO.
When the host wishes to read the FIFO, the following procedure is recommended.
1. Read the INT_STAT (0x02) register to determine what asserted the INT line. If GPI_INT or K_INT is set, then
a key event has occurred, and the event is stored in the FIFO.
2. Read the KEY_LCK_EC (0x03) register, bits [3:0] to see how many events are stored in FIFO.
3. Read the KEY_EVENT_A (0x04) register. Bit 7 value '0' signifies key release, value 1 signifies key press.
Bits [6:0] state which key was pressed with respect to the Key Event Table. With each read of the key event
register, the event counter in KEY_LCK_EC[3:0] will decrease by 1, and the FIFO will shift the events down 1
register.
4. Repeat step 3 until either KEY_LCK_EC[3:0] = 0 or KEY_EVENT_A = 0. This signifies that the FIFO is
empty.
16
Submit Documentation Feedback
Product Folder Links: TCA8418E
Copyright © 2010–2015, Texas Instruments Incorporated