Altera_Forum
Honored Contributor
10 years agoDE0-Nano-SoC G-Sensor without Linux
My intention is to make a level sensor using to LEDs and the G-Sensor on the DE0-Nano-SoC. When I tilt my board to the left, the LEDs towards the left should glow and so on.
I want to use the G-Sensor using a simple assembly program written for Nios II. The user manual says that the G-Sensor can be used by Nios II by using a particular base address. How can this be done and what are the registers available that I can make use of to access the accelerometer with a simple assembly program? There is a tutorial that uses Linux. It puts the Linux OS on the SD card and then uses the Accelerometer. I believe that becomes a very round about procedure. In case I can use the G-Sensor using Nios II, do I need to take care of the timing in the I2C protocol or will the I2C controller take care of it? Please do give me a list of the registers available and their addresses. Also tell me the procedure to make use of those registers.