Input/Output Interfaces

I/O Port 64h

I/O port 64h is used for reading the status register and for writing commands. A read of 64h by the CPU will yield the status byte defined as follows:

Bit Function

7..4 General Purpose Flags.

3CMD/DATA Flag (reflects the state of A2 during a CPU write). 0 = Data

1 = Command

2 General Purpose Flag.

1Input Buffer Full. Set (to 1) upon a CPU write. Cleared by IN A, DBB instruction.

0 Output Buffer Full (if set). Cleared by a CPU read of the buffer.

A CPU write to I/O port 64h places a command value into the input buffer and sets the CMD/DATA bit of the status register (bit <3>) to CMD.

Table 5-15 lists the commands that can be sent tothe 8042 by the CPU. The 8042 uses IRQ1 for gaining the attention of the CPU.

 

Table 5-15.

 

CPU Commands to the 8042

 

 

Value

Command Description

 

 

20h

Put current command byte in port 60h.

 

 

60h

Load new command byte.

 

 

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.

 

 

 

Technical Reference Guide

www.hp.com

5-19