AT83EC5123 ATMEL Corporation, AT83EC5123 Datasheet - Page 117

no-image

AT83EC5123

Manufacturer Part Number
AT83EC5123
Description
(AT8xx512x) Smart Card Reader ICs
Manufacturer
ATMEL Corporation
Datasheet
Keyboard Interface
Introduction
Description
Interrupt
4202B–SCR–07/03
Only for AT8xC5122.
The AT8xC5122/23 implements a keyboard interface allowing the connection of a 8 x n
matrix keyboard. It is based on 8 inputs with programmable interrupt capability on both
high or low level. These inputs are available as alternate function of P5 and allow to exit
from idle and power-down modes.
The keyboard interfaces with the C51 core through 3 special function registers: KBLS,
the Keyboard Level Selection register (Table 90 on page 120), KBE, The Keyboard
interrupt Enable register (Table 89 on page 119), and KBF, the Keyboard Flag register
(Table ).
The keyboard inputs are considered as 8 independent interrupt sources sharing the
same interrupt vector. An interrupt enable bit ( KBD in IE1) allows global enable or dis-
able of the keyboard interrupt (see Figure 79). As detailed in Figure 80 each keyboard
input has the capability to detect a programmable level according to KBLS.x bit value.
Level detection is then reported in interrupt flags KBF.x that can be masked by software
using KBE.x bits.
This structure allows keyboard arrangement from 1 by n to 8 by n matrix and allows
usage of P5 inputs for other purpose.
The KBF.x flags are set by hardware when an active level is on input P5.x. They are
automatically reset after any read access on KBF. If the content of KBF must be ana-
lyzed, the first read instruction must transfer KBF contend to another location. The KBF
register cannot be written by software.
Figure 79. Keyboard Interface Block Diagram
Figure 80. Keyboard Input Circuitry
P5.0
P5.1
P5.2
P5.3
P5.4
P5.5
P5.6
P5.7
P5.x
Input Circuitry
Input Circuitry
Input Circuitry
Input Circuitry
Input Circuitry
Input Circuitry
Input Circuitry
Input Circuitry
KBLS.x
0
1
KBF.x
IEN1.0
EKB
AT8xC5122/23
KBE.x
Keyboard Interface
Interrupt Request
KBDIT
117

Related parts for AT83EC5123