Technical Reference Guide
Compaq Deskpro EN Series of Personal Computers
Desktop and Minitower Form Factors
Third Edition - September 1998
5-31
Table 5-18 lists the commands that can be sent to the 8042 by the CPU. The 8042 uses IRQ1 for
gaining the attention of the CPU.
Table 5–17. CPU Commands To The 8042
Table 5-17.
CPU Commands To The 8042
Value Command Description
20h Put current command byte in port 60h.
60h Load new command byte. This is a two-byte operation described as follows:
1. Write 60h to port 64h.
2. Write the command byte to port 60h as follows:
Bit <7> Reserved
<6> Keyboard Code Conversion
0 = Do not convert codes
1 = Convert codes to 9-bit 8088/8086-compatible format
Bit <5> Pointing Device Enable
0 = Enable pointing device
1 = Disable pointing device
Bit <4> Keyboard Enable
0 = Enable keyboard
1 = Disable keyboard
Bit <3> Reserved
Bit <2> System Flag
0 = Cold boot
1 = CPU reset (exit from protected mode)
Bit <1> Pointing Device Interrupt Enable
0 = Disable interrupt
1 = Enable interrupt
Bit <0> Keyboard Interrupt Enable
0 = Disable interrupt
1 = Enable interrupt
A4h Test password installed. Tests whether or not a password is installed in the 8042:
If FAh is returned, password is installed.
If F1h is returned, no password is installed.
A5h Load password. This multi-byte operation places a password in the 8042 using the following manner:
1. Write A5h to port 64h.
2. Write each character of the password in 9-bit scan code (translated) format to port 60h.
3. Write 00h to port 60h.
A6h Enable security. This command places the 8042 in password lock mode following the A5h command.
The correct password must then be entered before further communication with the 8042 is allowed.
A7h Disable pointing device. This command sets bit <5> of the 8042 command byte, pulling the clock line
of the pointing device interface low.
A8h Enable pointing device. This command clears bit <5> of the 8042 command byte, activating the clock
line of the pointing device interface.
A9h Test the clock and data lines of the pointing device interface and place test results in the output buffer.
00h = No error detected
01h = Clock line stuck low
02h = Clock line stuck high
03h = Data line stuck low
04h = Data line stuck high
AAh Initialization. This command causes the 8042 to inhibit the keyboard and pointing device and places
55h into the output buffer.
ABh Test the clock and data lines of the keyboard interface and place test results in the output buffer.
00h = No error detected
01h = Clock line stuck low
02h = Clock line stuck high
03h = Data line stuck low
04h = Data line stuck high
ADh Disable keyboard command (sets bit <4> of the 8042 command byte).
AEh Enable keyboard command (clears bit <4> of the 8042 command byte).
Continued