AT83C51SND1C_03 ATMEL [ATMEL Corporation], AT83C51SND1C_03 Datasheet - Page 179

no-image

AT83C51SND1C_03

Manufacturer Part Number
AT83C51SND1C_03
Description
Single-Chip Flash Microcontroller with MP3 Decoder and Human Interface
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
Keyboard Interface
Description
Power Reduction Mode
4109E–8051–06/03
The AT8xC51SND1C implement a keyboard interface allowing the connection of a 4 x n
matrix keyboard. It is based on 4 inputs with programmable interrupt capability on both
high or low level. These inputs are available as alternate function of P1.3:0 and allow
exit from idle and power down modes.
The keyboard interfaces with the C51 core through 2 special function registers: KBCON,
the keyboard control register (see Table 151); and KBSTA, the keyboard control and
status register (see Table 152).
The keyboard inputs are considered as 4 independent interrupt sources sharing the
same interrupt vector. An interrupt enable bit (EKB in IEN1 register) allows global
enable or disable of the keyboard interrupt (see Figure 134). As detailed in Figure 135
each keyboard input has the capability to detect a programmable level according to
KINL3:0 bit value in KBCON register. Level detection is then reported in interrupt flags
KINF3:0 in KBSTA register.
A keyboard interrupt is requested each time one of the four flags is set, i.e. the input
level matches the programmed one. Each of these four flags can be masked by soft-
ware using KINM3:0 bits in KBCON register and is cleared by reading KBSTA register.
This structure allows keyboard arrangement from 1 by n to 4 by n matrix and allow
usage of KIN inputs for any other purposes.
Figure 134. Keyboard Interface Block Diagram
Figure 135. Keyboard Input Circuitry
KIN3:0 inputs allow exit from idle and power-down modes as detailed in section “Power
Management”, page 46. To enable this feature, KPDE bit in KBSTA register must be set
to logic 1.
Due to the asynchronous keypad detection in power down mode (all clocks are
stopped), exit may happen on parasitic key press. In this case, no key is detected and
software must enter power down again.
KIN0
KIN1
KIN2
KIN3
KIN3:0
Input Circuitry
Input Circuitry
Input Circuitry
Input Circuitry
KBCON.7:4
KINL3:0
0
1
KBSTA.3:0
KINF3:0
AT8xC51SND1C
IEN1.4
EKB
KBCON.3:0
KINM3:0
Keyboard Interface
Interrupt Request
179

Related parts for AT83C51SND1C_03