HALICERY

free-time coding, hardware dev, articles

Top
Home 8042 Blogs About
Home 8042

Last modified: Mon Feb 11 11:43:27 UTC+0100 2019 © A. Tarpai


AT Keyboard and PS/2 Keyboard/Auxiliary 8042 Controller

In the AT in 1984 IBM used the 8042 UPI microcomputer as the keyboard controller. When the IBM PS/2 came out in 1987 it had two, similar 6-pin mini-DIN connectors. One for the keyboard device (KBD) and one for the auxiliary device, AUX (mouse, touchpad, trackball). On the motherboard IBM used the same 8042 microcomputer UPI as in the AT, with extended code for interfacing with the KBD and AUX. Most of the programming and electrical features are the same as of the AT (I/O ports 0x60/0x64, bi-directional serial communication using the "AT PROTOCOL"), but the 8042 in the PS/2 is programmed to control a second device.

           1984                                                 1987
        ____ ____                                     ___ ___           ___ ___
       /    -    \                                   /   -   \         /   -   \
      |           |                                 |  6   5  |       |  6   5  |
      | 1       3 |                                 | 4     3 |       | 4     3 |
      |  4     5  |                                  \  2 1  /         \  2 1  /
       \    2    /                                     -----             -----
         -------
           AT                                          PS/2              PS/2
        5-pin DIN                                 6-pin Mini-DIN    6-pin Mini-DIN
        KEYBOARD                                     KEYBOARD          AUXILIARY


         CLOCK                                            CLOCK   CLOCK
          DATA                                             DATA    DATA
          | |                                              | |     | |
          | |                                              | |     | |
      "AT PROTOCOL"                                       "AT PROTOCOL"
          | |                                              | |     | |
          | |                                              | |     | |
          | |                                              | |     | |
      +--------------+                                  +--------------+
 +----|     8042     |--------+                    +----|     8042     |--------+
 |    +--------------+        |                    |    +--------------+        |
 |       0x60/0x64            |                    |       0x60/0x64            |
 |                            |                    |                            |
 |       IBM AT               |                    |       IBM PS/2             |
 |       ("Host")             |                    |       ("Host")             |
 +----------------------------+                    +----------------------------+

On the 'other side', in the keyboard itself there is another microcontroller, the intel 8048, which scans the keyboard matrix and communicates with the PC. Details of the operation can be found in the ROM disassemblies.