10.07.2015 Views

User Manual - Terasic

User Manual - Terasic

User Manual - Terasic

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• KEYThe KEY button is driven by PIO Controller with interrupt enabled. It is design to generate aninterrupt event when users click KEY0 or KEY1. The interrupt event is used to terminateaccelerometer and analog to digital conversion process in this demo.For default, the interrupt is disabled in the PIO Controller. <strong>User</strong>s can enable it with the parametersetting as shown in below Figure 8-7.Figure 8-7 PIO Controller• Accelerometer ControlThe accelerometer controller is a custom SOPC component developed by <strong>Terasic</strong>. The source codeis available under the folder \DE0_NANO_SOPC_DEMO\ip\TARASIC_SPI_3WIRE.In this demo, the accelerometer is controlled through a 3-wire SPI. Before reading any data from theaccelerometer, master should set 1 on the SPI bit in the Register 0x31 – DATA_FORMAT register,as shown in below Figure 8-8, to set the device to 3-wire SPI mode.Figure 8-8 DATA_FORMAT Register136

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

Saved successfully!

Ooh no, something went wrong!