Xilinx Spartan-3A User Manual page 67

Starter kit board
Hide thumbs Also See for Spartan-3A:
Table of Contents

Advertisement

R
ESC
F1
F2
76
05
06
` ~
1 !
2 @
3 #
0E
16
1E
26
TA B
Q
W
0D
15
1D
A
S
Caps Lock
58
1C
1B
Shift
Z
12
1Z
Ctrl
Alt
14
11
The host can also send commands and data to the keyboard.
of some often-used commands.
Table 8-3: Common PS/2 Keyboard Commands
Command
ED
Turn on/off Num Lock, Caps Lock, and Scroll Lock LEDs. The keyboard acknowledges receipt of an
"ED" command by replying with an "FA", after which the host sends another byte to set LED status. The
bit positions for the keyboard LEDs are shown below. Write a '1' to the specific bit to illuminate the
associated keyboard LED.
7
EE
Echo. Upon receiving an echo command, the keyboard replies with the same scan code "EE".
F3
Set scan code repeat rate. The keyboard acknowledges receipt of an "F3" by returning an "FA", after
which the host sends a second byte to set the repeat rate.
FE
Resend. Upon receiving a resend command, the keyboard resends the last scan code.
FF
Reset. Resets the keyboard.
The keyboard sends commands or data to the host only when both the data and clock lines
are High, the Idle state.
Because the host is the bus master, the keyboard checks whether the host is sending data
before driving the bus. The clock line can be used as a clear to send signal. If the host pulls
the clock line Low, the keyboard must not send any data until the clock is released.
The keyboard sends data to the host in 11-bit words that contain a '0' start bit, followed by
eight bits of scan code (LSB first), followed by an odd parity bit and terminated with a '1'
stop bit. When the keyboard sends data, it generates 11 clock transitions at around 20 to
30 kHz, and data is valid on the falling edge of the clock as shown in
Spartan-3A/3AN Starter Kit Board User Guide
UG334 (v1.0) May 28, 2007
F3
F4
F5
04
0C
03
4 $
5 %
6 ^
7 &
25
2E
36
3D
E
R
T
Y
24
2D
2C
35
D
F
G
H
23
2B
34
33
X
C
V
B
22
21
2A
32
Space
29
Figure 8-3: PS/2 Keyboard Scan Codes
6
5
Ignored
www.xilinx.com
F6
F7
F8
F9
0B
83
0A
01
8 *
9 (
0 )
- _
3E
46
45
4E
U
I
O
P
3C
43
44
4D
J
K
L
; :
3B
42
4B
4C
N
M
, <
> .
31
3A
41
49
Alt
E0 11
Description
4
3
Caps Lock Num Lock
Keyboard
F10
F11
F12
09
78
07
= +
Back Space
55
66
[ {
] }
\ |
54
5B
5D
E0 6B
' "
Enter
52
5A
/ ?
Shift
4A
59
Ctrl
E0 14
UG230_c8_03_021806
Table 8-3
provides a short list
2
1
Scroll Lock
Figure
8-2.
E0 75
E0 74
E0 72
0
67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Spartan-3an

Table of Contents