SM59R16A5/SM59R09A5/SM59R05A5
8-Bit Micro-controller
64KB/36KB/20KB with ISP Flash
& 2KB RAM embedded
16. KBI – Keyboard Interface
Keyboard interface (KBI) can be connected to an 8 x n matrix keyboard or any similar devices. It has 8 inputs with
programmable interrupt capability on either high or low level. These 8 inputs are through P2 or P0 and can be the external
interrupts to leave from the idle and stop modes. The 8 inputs are independent from each other but share the same
interrupt vector 5Bh.
Input
circuitry
KBI0
Input
circuitry
KBI1
Input
circuitry
KBI2
Input
KBI3
circuitry
OR
Input
circuitry
Input
circuitry
Input
circuitry
Input
KBI4
KBI5
KBI6
KBI7
KBIIF: KBI interrupt flag
IEKBI: KBI interrupt enable
circuitry
Figure 16.1 keyboard interface block diagram
250KHz
KBIx
0
De-bounce
KBF.x
1
KBD[1:0]
KBLS.x
KBE.x
Figure 16.2 keyboard input circuitry
Mnemonic
Description
Direct
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
RESET
KBI function
P4UR
1
P2PW
M
AUX
Auxiliary register
91h
93h
BRGS
-
P4SPI
P4IIC
P0KBI
DPS
00H
00H
KBI level
selection
KBLS
KBLS7 KBLS6 KBLS5 KBLS4 KBLS3 KBLS2 KBLS1 KBLS0
KBE
KBF
KBI input enable
KBI flag
94h
95h
KBE7
KBF7
KBE6
KBF6
KBE5
KBF5
KBE4
KBF4
KBE3
KBF3
KBE2
KBF2
KBE1
KBF1
KBE0
KBF0
00H
00H
KBI De-bounce
control register
KBD
96h
KBDEN
-
-
-
-
-
KBD1
KBD0
00H
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M047 68 Ver.G SM59R16A5 01/2014