10.07.2015 Views

User Manual - Terasic

User Manual - Terasic

User Manual - Terasic

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In this demo, the accelerometer is controlled through a 3-wire SPI. Before reading any data from theaccelerometer, the controller sets 1 on the SPI bit in the Register 0x31 – DATA_FORMAT register.The 3-wire SPI Controller block reads the digital accelerometer X-axis value, to determine the tiltof the board. The LEDs are lit up as if they were a bubble, floating to the top of the board.Demonstration Source Code• Project directory: DE0_NANO_GSensor• Bit stream used: DE0_NANO_G_Sensor.sofDemonstration Batch FileDemo Batch File Folder: DE0_NANO_GSensor\demo_batchThe demo batch file includes the following files:• FPGA Configure File: DE0_NANO_G_Sensor.sofDemonstration Setup• Make sure Quartus II is installed on your PC.• Connect USB cable to the DE0-Nano board and install the USB Blaster driver if necessary.• Execute the demo batch file “test.bat” under the batch file folder,DE0_NANO_GSensor\demo_batch. This will load the demo into the FPGA.• Tilt the DE0-Nano board from side to side and observe the result on the LEDs.142

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!