
DECA User Manual
63
www.terasic.com
May 22, 2015
The directory includes the following files:
Batch file: test.bat
FPGA configuration file: DECA_Gesture_Light_Sensor.sof
Demonstration Setup
Quartus II v15.0 must be pre-installed to the host PC.
Connect the DECA board (J10) to the host PC with a USB cable and install the USB-Blaster II
driver if necessary
Plug the 5V adapter to DECA.
Execute the demo batch file “test.bat” from the directory
\Gesture_Light_Sensor_RTL\demo_batch
Move hand close to DECA back (because Light Sensor is on the back of DECA board),
LED0~LED7 light according to the distance LEVEL. When hand gets closer to DECA board,
more LEDS light up. When hand is closest to board, all LEDs light up. On the contrary, when
hand gets further to DECA board, less LEDS light up, when hand is far enough, only LED0
lights up.
5
5
.
.
6
6
G
G
-
-
S
S
e
e
n
n
s
s
o
o
r
r
A 3-axis G-sensor (LIS2DH12TR) embedded on DECA board can monitor DECA 3D gravitational
acceleration. Three axis are x/y/z. Every axis angle value outputs by way of SPI interface. This
demonstration is using a SPI_CTL(RTL code ) of MAX10 to read x-axis value of LIS2DH12TR to
do gradienter. Finally DECA inclination status can be reflected on LED0~LED7.
Function Block Diagram
Figure 5-9
is the function block diagram of this demonstration. SPI_CTL is a SPI controller that to
read x-axis value of LIS2DH12TR.The value output to led_driver converts inclination angle to
inclination value and ouput 8-bit to LED0~LED7.