MAX 10 Plus User
Manual
75
May 31, 2019
Figure 6-26 Display Progress and Result Information for the Socket Server Demonstration
6.6
Digital Accelerometer Demonstration
This demonstration shows a bubble level implementation based on a digital accelerometer. We use
I2C protocol to control the ADXL345 digital accelerometer, and the APDS-9301 Miniature Ambient
Light Photo Sensor. The Nios II Console displays the reuslt of our demo. When tilting the MAX 10
Plus, 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 Nios II Console. The
value of light sensor will change as the brightness changes around the light sensor.
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.
Figure 6-27 Block Diagram of the Digital Accelerometer Demonstration
◼
Demonstration Source Code
•
Project directory: gsensor_lightsensor
•
Bit stream used: gsensor_lightsensor.sof