NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
227
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed, distributed or reproduced without permission
from Winbond.
Table No.: 2005-W90P710-11-A
21 PS/2 Host Interface Controller
21.1 Overview
W90P710 PS/2 host controller interface implements a bi-directional serial protocol to connect a
IBM AT or PS/2 keyboard. The host controller handles the electronic interface and protocol without
software involving. If any key is being pressed, released, or held down, the keyboard will send a
packet of information known as a "
scan code
" to host controller. The host controller will put the scan
code and its corresponding ASCII code iinto registers, then generate an interrupt to note software
driver. Instead of using interrupt method, the software drives can continuously read the status register
to check whether a scan code arrived or not. Besides, the host controller provides a command
register for software driver to send commands to keyboard.
Some devices implementing PS/2 protocol can be connected to this host controller. For example,
the BAR code scanner. But the PS/2 mouse may not work with this host controller. Because the host
controller can’t distinguish “E0” (for extended byte) and “F0” (for break code) from a data byte of a
mouse movement data packet.
21.2 Scan Code Set
For PS/2 keyboard, there are two different types of scan codes: "
make codes
"
and "
break
codes
". A make code is sent when a key is pressed or held down. A break code is sent when a key
is released. Every key is assigned its own unique make code and break code. The set of make and
break codes for every key comprises a "scan code set". There are three standard scan code sets,
named one, two, and three. All modern keyboards default to set two. The W90P710 PS/2 host
controller can identify the ASCII code of a key is being pressed, released or held down according to
the scan code set two. The following figures show the key map of scan code set two. All the scan
codes are shown in Hex.
Figure 21-1 Key map of PS/2 keyboard