MAX 10 NEEK
94
www.terasic.com
February 4, 2016
Project directory: lcd_painter
Nios II Eclipse Project workspace: lcd_painter/software
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: \lcd_painter\demo_batch
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
Please follow the procedures below to set up the demonstration:
Connect a USB cable between your computer and the USB connector(J8) on MAX 10 NEEK
board.
Power on the MAX 10 NEEK Board.
Please make sure Quartus II has been installed on the host PC.
Execute the demo batch file “lcd_painter.bat ” under the folder lcd_painter\demo_batch.
The painter GUI will show up on the LCD panel.
6
6
.
.
7
7
D
D
i
i
g
g
i
i
t
t
a
a
l
l
A
A
c
c
c
c
e
e
l
l
e
e
r
r
o
o
m
m
e
e
t
t
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
This demonstration shows a bubble level implementation based on a digital accelerometer. We use
I
2
C protocol to control the ADXL345 digital accelerometer, and the APDS-9301 Miniature Ambient
Light Photo Sensor. The LCD displays the interface of our demo. When tilting the MAX 10 NEEK,
the ADXL345 measures the static acceleration of gravity. In our Nios II software, we compute the
change of angle in the x-axis and y-axis, and show the angle data on the LCD display. The value of
light sensor will change as the brightness changes around the light sensor.
Figure 6-32
shows the hardware system block diagram of this demonstration. The system is
clocked by an external 50MHz Oscillator. Through the internal PLL module, the generated 100MHz
clock is used for Nios II processor and other components, and there is also 40MHz for low-speed
peripherals.