Ps/2 mouse/keyboard port, Chapter 6: ps/2 mouse/keyboard port, Chapter 6, “ps/2 mouse/keyboard port – Digilent 410-044-10P-KIT User Manual
Page 27: Chapter 6

Spartan-3 Starter Kit Board User Guide
27
UG130 (v1.1) May 13, 2005
1-800-255-7778
R
Chapter 6
PS/2 Mouse/Keyboard Port
The Spartan-3 Starter Kit board includes a PS/2 mouse/keyboard port and the standard 6-
pin mini-DIN connector, labeled J3 on the board and indicated as
Figure 6-1
shows the PS/2 connector, and
Table 6-1
shows the signals on the connector.
Only pins 1 and 5 of the connector attach to the FPGA. A detailed schematic appears in
.
Both a PC mouse and keyboard use the two-wire PS/2 serial bus to communicate with a
host device, the Spartan-3 FPGA in this case. The PS/2 bus includes both clock and data.
Both a mouse and keyboard drive the bus with identical signal timings and both use 11-bit
words that include a start, stop and odd parity bit. However, the data packets are
organized differently for a mouse and keyboard. Furthermore, the keyboard interface
allows bidirectional data transfers so the host device can illuminate state LEDs on the
keyboard.
The PS/2 bus timing appears
. The clock and data signals are only
driven when data transfers occur, and otherwise they are held in the idle state at logic
High. The timings define signal requirements for mouse-to-host communications and
Figure 6-1:
PS/2 DIN Connector
Table 6-1:
PS/2 Connections to the Spartan-3 FPGA
PS/2 DIN Pin
Signal
FPGA Pin
1
DATA (PS2D)
M15
2
Reserved
—
3
GND
GND
4
Voltage Supply
—
5
CLK (PS2C)
M16
6
Reserved
—
9
1
5
3
2
4
6
UG130_c6_01_042404