VEEK-MT2 User Manual
41
www.terasic.com
July 4, 2016
20MHz for low-speed peripherals, such as LEDs and buttons. The NIOS II program is running on the
SRAM; the SDRAM is used as video frame buffers in the Altera VIP block. The I2C_OpenCore
controllers are used to communicate with the MPU9250 chip and the APDS-9300 chips. The VIP block
is used to implement video streaming for displaying graphic on the LCD panel. The video steaming is:
Nios II Processor
SDRAM
VIP: Frame Reader
VIP: Clocked Video Output
LCD Panel..
Figure 4-16 Block diagram of the digital accelerometer demonstration
In the NIOS II program, the GUI (graphic user interface) is implemented in the gui_gsensor.cpp. The
MPU9250 class, implemented in the MPU9250.cpp/.h is used to retrieve accelerometer information
from the MPU9250. The member function
initialize
of the MPU9250 class should be called first before
calling any other member function. In this demonstration, the member function
getMotion9
is called to
get the gravity value of X/Y/Z. The light_sensor.cpp/h includes the library which allows it to
communicate with the APDS-9300 Miniature Ambient Light Photo Sensor. Before reading the light
level information, call function Light_Init first to initialize the sensor APDS-9300. The function
Light_GetID
is designed to get the chip ID of APDS-9300. Function
Light_Get_ADCData0
and
Light_Get_ADCData1
are designed to get the two ADC values in APDS-9300
Demonstration Source Code
Project directory: G_sensor
Bit stream used: VEEK_MT2.sof
Nios II Workspace: G_sensor\Software
Summary of Contents for VEEK-MT2
Page 1: ...1 ...