Xilinx Spartan-3 User Manual page 29

Starter kit board
Table of Contents

Advertisement

Keyboard
ESC
F1
F2
76
05
06
` ~
1 !
2 @
0E
16
1E
TAB
Q
W
0D
15
1D
A
Caps Lock
58
1C
1B
Shift
Z
12
1Z
Ctrl
Alt
14
11
The host can also send data to the keyboard.
used commands.
Table 6-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 appear in
illuminate the associated keyboard LED.
Table 6-4: Keyboard LED Control
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 sent.
FF
Reset. Resets the keyboard.
The keyboard sends 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-3 Starter Kit Board User Guide
UG130 (v1.1) May 13, 2005
F3
F4
F5
04
0C
03
3 #
4 $
5 %
6 ^
26
25
2E
36
E
R
T
Y
24
2D
2C
35
S
D
F
G
23
2B
34
X
C
V
B
22
21
2A
32
Space
Figure 6-3: PS/2 Keyboard Scan Codes
6
5
Ignored
F6
F7
F8
0B
83
0A
7 &
8 *
9 (
0 )
3D
3E
46
45
U
I
O
3C
43
44
4D
H
J
K
L
33
3B
42
4B
N
M
, <
> .
31
3A
41
49
29
Table 6-3
Description
Table
4
3
Caps
Lock
www.xilinx.com
1-800-255-7778
F9
F10
F11
F12
01
09
78
07
- _
= +
Back Space
4E
55
66
P
[ {
] }
\ |
54
5B
5D
; :
' "
Enter
4C
52
5A
/ ?
Shift
4A
59
Alt
Ctrl
E0 11
E0 14
UG130_c6_03_042404
provides a short list of some often-
6-4. Write a '1' to the specific bit to
2
1
0
Num
Scroll
Lock
Lock
Figure
R
E0 75
E0 74
E0 6B
E0 72
6-2.
29

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Spartan-3 fpga

Table of Contents