Datasheet

www.ti.com
TSC2301 KEYPAD REGISTERS
Keypad Control Register (Page 1, Address 01H)
TSC2301
SLAS371D SEPTEMBER 2002 REVISED AUGUST 2004
The keypad scanner hardware in the TSC2301 is controlled by two registers: the keypad control register and the
keypad mask register. The keypad control register controls general keypad functions such as scanning and
de-bouncing, while the keypad mask register allows you to mask certain keys from being detected at all.
The Keypad Control register is formatted as follows:
Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
MSB LSB
STC SCS DB2 DB1 DB0 X X X X X X X X X X X
Bit 15 STC
Keypad Status. This bit reflects the operation of the KBIRQ pin, with inverted logic. This bit goes high when a key
is pressed and debounced. The default value for this bit is 0.
Table 20. STC Bit Operation
STC
Value Description
0 No keys are pressed (default)
1 Key pressed and debounced
Bit 14 SCS
Keypad Scan Status. When reading, this bit indicates if the scanner or de-bouncer is busy. Writing a 0 to this bit
causes keypad scans to continue until either the key is lifted or the process is stopped. Continuous scans can be
stopped by writing a 1 to this bit. This immediately halts a conversion (even if a key is still down). The default
value for this bit when read is 1.
Table 21. SCS Bit Operation
SCS
Read/Write Value Description
Read 0 Scanner or de-bouncer busy
Read 1 Scanner not busy (default)
Write 0 Normal operation
Write 1 Stop scans
Bits [13:11] KBDB2-KBDB0
Keypad De-bounce Control. These bits set the length of the de-bounce time for the keypad, as shown in
Table 22 . The default setting is a 2-ms de-bounce time (000).
Table 22. Keypad De-Bounce Control
KBDB2 KBDB1 KBDB0 Function
0 0 0 De-bounce: 2 ms (default)
0 0 1 De-bounce: 10 ms
0 1 0 De-bounce: 20 ms
0 1 1 De-bounce: 50 ms
1 0 0 De-bounce: 60 ms
1 0 1 De-bounce: 80 ms
1 1 0 De-bounce: 100 ms
1 1 1 De-bounce: 120 ms
35