
10.0 Legacy Functional Blocks
(Continued)
Revision 1.2
229
www.national.com
P
10.4 KEYBOARD AND MOUSE CONTROLLER (KBC)
10.4.1
The KBC is implemented physically as a single hardware module and houses two separate logical devices: a mouse con-
troller (Logical Device 5) and a keyboard controller (Logical Device 6). The KBC is functionally equivalent to the industry
standard 8042A keyboard controller. The 8042A datasheet can be used as a detailed technical reference for the KBC.
The hardware KBC module is integrated to provide the following pin functions: P12, P16, P17, KBRST (P20), GA20 (P21),
KBDAT, KBCLK, MDAT and MCLK. KBRST and GA20 are implemented as bidirectional open-drain pins. The keyboard and
mouse interfaces are implemented as bidirectional open-drain pins. P12, P16 and P17 are implemented as quasi-bidirec-
tional pins. Their internal connections are shown in Figure 53.
P10, P11, P13-P15 and P22-P27 of the KBC core are not available on dedicated pins; neither are T0 and T1. P10, P11,
P22, P23, P26, P27, T0 and T1 are used to implement the keyboard and mouse interface.
Internal pull-ups are implemented only on P12, P16 and P17.
The KBC executes a program fetched from an on-chip 2Kbyte ROM. The code programmed in this ROM is user-customiz-
able. The KBC has two interrupt request signals: one for the keyboard and one for the mouse. The interrupt requests are
implemented using ports P24 and P25 of the KBC core. The interrupt requests are controlled exclusively by the KBC firm-
ware, except for the type and number, which are affected by configuration registers (see Section 3.2.3 on page 40).
The interrupt requests are implemented as bidirectional signals. When an I/O port is read, all unused bits return the value
latched in the output registers of the ports.
General Description
For KBC firmware that implements interrupt-on-OBF schemes, the following is the recommended implementation:
1. Put the data in DBBOUT.
2. Set the appropriate port bit to issue an interrupt request.
Figure 53. Keyboard and Mouse Interfaces
KBD IRQ
Mouse IRQ
KBC
KBCLK
KBDAT
T0
P10
MCLK
MDAT
T1
P11
P26
P27
P23
P22
STATUS
DBBIN
DBBOUT
Matrix
P24
P25
P20
P21
P12
P16
I
KBRST
GA20
P12
P16
P17
P17