Datasheet
18
www.ti.com
TSC2200
SBAS191F
C1 C2 C3 C4
R1 K0 K1 K2 K3
R2 K4 K5 K6 K7
R3 K8 K9 K10 K11
R4 K12 K13 K14 K15
TABLE XXX. Keypad to Key Bit Mapping.
STC
VALUE DESCRIPTION
0 No Keys Are Pressed
1 Keys Pressed and De-Bounced
TABLE XXVI. STC Bit Operation.
SCS
READ/WRITE VALUE DESCRIPTION
Read 0 Scanner or De-Bouncer Busy
Read 1 Scans are Complete, Data is Available
Write 0 Normal Operation
Write 1 Stop Scans
TABLE XXVII. SCS Bit Operation.
TABLE XXVIII. Keypad De-Bounce Control.
KBDB2 KBDB1 KBDB0 FUNCTION
0 0 0 De-Bounce: 2ms
0 0 1 De-Bounce: 10ms
0 1 0 De-Bounce: 20ms
0 1 1 De-Bounce: 50ms
1 0 0 De-Bounce: 60ms
1 0 1 De-Bounce: 80ms
1 1 0 De-Bounce: 100ms
1 1 1 De-Bounce: 120ms
MSB LSB
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
STC SCS DB2 DB1 DB0 X X X X X X X X X X X
TABLE XXV. Keypad Control Register.
MSB LSB
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
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0
TABLE XXIX. Keypad Mask Register.
KEYPAD CONTROL REGISTER
(PAGE 1, ADDRESS 01
H
)
The Keypad Control register is formatted as shown in Table XXV.
Bit 15: STC = Keyboard Status. This bit reflects the opera-
tion of the
KBIRQ
pin, with inverted logic. This bit will go
HIGH when a key is pressed and de-bounced. The default
value for this bit is zero.
Bit 14: SCS = Keyboard Scan Status. When reading, this bit
indicates if the scanner or de-bouncer is busy or if scans are
complete and data is available. Writing a zero to this bit will
cause keyboard 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 will immediately halt a conver-
sion (even if a key is still down). The default value for this bit
when read is 1.
Bits [13:11]: KBDB2-KBDB0 = Keyboard De-Bounce Con-
trol. These bits set the length of the de-bounce time for the
keypad, as shown in Table XXVIII. The default setting is a
2ms de-bounce time (000).
KEYPAD MASK REGISTER
(PAGE 1, ADDRESS 10
H
)
The Keypad Mask register is formatted as shown in Table XXIX.
This is the same format as used in the Keypad Data register
(Page 0, Address 04
H
). Each bit in these registers represents
one key on the keypad. In the Mask register, if a bit is set (1),
then that key will not be detected in keyboard scans. Pressing
that key on the keypad will also not cause a
KBIRQ
, if the bit is
set. If the bit is cleared (0), the corresponding key will be
detected. A 16-key keypad is mapped into the Keypad Mask
(and Keypad Data) register, as shown in Table XXX. The default
value for this register is 0000
H
, detecting all key presses.
The result of a keypad scan will appear in the Keypad Data
register. Each bit will be set in this register, corresponding to
the key(s) actually pressed. For example, if only KEY1 was
pressed on a particular scan, the data in the register would
read as 0002
H
; however, if keys 6, 8, and 13 were all pressed
simultaneously on that scan, the data would read as 2140
H
.
Multiple keys may be pressed simultaneously, and will generally
be decoded correctly by the keypad scan circuitry. However,
keys that land on three corners of a rectangle may cause a false
reading of a key on the fourth corner of the rectangle. For
example, if 0, 3, and 11 were pressed simultaneously, the
KEY0, KEY3, and KEY11 bits will be set, but the KEY8 bit will
also be set. Thus, when considering using multiple-key combi-
nations in an application, try to avoid combinations that put
three keys on the corners of a rectangle.
RESET REGISTER
(PAGE 1, ADDRESS 04
H
)
The TSC2200 has a special register, the RESET register, which
allows a software reset of the device. Writing the code BBXX
H
,
as shown in Table XXXI, to this register will cause the TSC2200
to reset all its registers to their default, power-up values.
Writing any other values to this register will do nothing.
Reading this register or any reserved register will result in
reading back all 1’s, or FFFF
H
.