Input/Output Interfaces

Table 5-16 lists and describes commands that can be issued by the 8042 to the keyboard.

Table 5-16.

8042-To-Keyboard Commands

Command

Value

Description

 

 

 

 

Set/Reset Status Indicators

EDh

Enables LED indicators. Value EDh is followed by an option

 

 

byte that specifies the indicator as follows:

 

 

Bits <7..3> not used

 

 

 

Bit <2>, Caps Lock (0 = off,

1 = on)

 

 

Bit <1>, NUM Lock (0 = off,

1 = on)

 

 

Bit <0>, Scroll Lock (0 = off,

1 = on)

 

 

 

Echo

EEh

Keyboard returns EEh when previously enabled.

 

 

 

Invalid Command

EFh/F1h

These commands are not acknowledged.

 

 

 

Select Alternate Scan Codes

F0h

Instructs the keyboard to select another set of scan codes

 

 

and sends an option byte after ACK is received:

 

 

01h = Mode 1

 

 

 

02h = Mode 2

 

 

 

03h = Mode 3

 

 

 

 

Read ID

F2h

Instructs the keyboard to stop scanning and return two

 

 

keyboard ID bytes.

 

 

 

 

Set Typematic Rate/Display

F3h

Instructs the keyboard to change typematic rate and delay to

 

 

specified values:

 

 

 

Bit <7>, Reserved—0

 

 

 

Bits <6,5>, Delay Time

 

 

 

00 = 250 ms

 

 

 

01 = 500 ms

 

 

 

10 = 750 ms

 

 

 

11 = 1000 ms

 

 

 

Bits <4..0>, Transmission Rate:

 

 

00000 = 30.0 ms

 

 

00001 = 26.6 ms

 

 

00010 = 24.0 ms

 

 

00011 = 21.8 ms

 

 

:

 

 

 

11111 = 2.0 ms

 

 

 

Enable

F4h

Instructs keyboard to clear output buffer and last typematic

 

 

key and begin key scanning.

 

 

 

 

Default Disable

F5h

Resets keyboard to power-on default state and halts scanning

 

 

pending next 8042 command.

 

 

 

 

Set Default

F6h

Resets keyboard to power-on default state and enable

 

 

scanning.

 

 

 

 

Set Keys—Typematic

F7h

Clears keyboard buffer and sets default scan code set. [1]

 

 

 

 

Technical Reference Guide

361834-002

5-19