76
D
D
e
e
m
m
o
o
n
n
s
s
t
t
r
r
a
a
t
t
i
i
o
o
n
n
B
B
a
a
t
t
c
c
h
h
F
F
i
i
l
l
e
e
Demo Batch File Folder: DE1_SoC_PS2_DEMO \demo_batch
The demo batch file includes the following files:
Batch File: DE1_SoC_PS2_DEMO.bat
FPGA Configure File : DE1_SoC_PS2_DEMO.sof
D
D
e
e
m
m
o
o
n
n
s
s
t
t
r
r
a
a
t
t
i
i
o
o
n
n
S
S
e
e
t
t
u
u
p
p
,
,
F
F
i
i
l
l
e
e
L
L
o
o
c
c
a
a
t
t
i
i
o
o
n
n
s
s
,
,
a
a
n
n
d
d
I
I
n
n
s
s
t
t
r
r
u
u
c
c
t
t
i
i
o
o
n
n
s
s
Load the bit stream into FPGA by executing DE1_SoC_PS2_DEMO \demo_batch\
DE1_SoC_PS2_DEMO.bat
Plug in the PS/2 mouse
Press KEY[0] for enabling data transfer
Press KEY[1] to clear the display data cache
You should see digital changes on 7-segment display when the PS/2 mouse moves, and the
LEDR[2:0] will blink respectively when the left-button, right-button or middle-button is pressed.
Table 5-5
gives the detailed information.
Table 5-5 Detailed information of the indicators
Indicator Name
Description
LEDR[0]
Left button press indicator
LEDR[1]
Right button press indicator
LEDR[2]
Middle button press indicator
HEX0
Low byte of X displacement
HEX1
High byte of X displacement
HEX2
Low byte of Y displacement
HEX3
High byte of Y displacement
5
5
.
.
8
8
I
I
R
R
E
E
m
m
i
i
t
t
t
t
e
e
r
r
L
L
E
E
D
D
a
a
n
n
d
d
R
R
e
e
c
c
e
e
i
i
v
v
e
e
r
r
D
D
e
e
m
m
o
o
n
n
s
s
t
t
r
r
a
a
t
t
i
i
o
o
n
n
In this demonstration we show a simple example of using IR Emitter LED and IR receiver. All the
codes in this demonstration are coding by verilog HDL.