- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
After taking a university course on the DE2 Board I have been interested with the compact and portability of the Nano. With a 3 month wait from US Distributors (digi-key.....) I ordered one from Taiwan and had it in 2 days. Does anyone have any experience with the accelerometer? I have used the Control panel to read the XYZ outputs but where do they link into VHDL Code? I have found that: I2C_SCLK I2C_SDAT G_SENSOR_CS_N G_SENSOR_INT relate to the accelerometer but with no luck in actually using them. I was expecting an output lets call "X" that would be assigned different values based on the accelerometer readings but I must be mistaken. Any direction would be greatly appreciated. Thanks, BenLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, you need to implement the interface to the Accelerometer chip on the board. It is not as simple as accessing registers with the acceleration values stored in them. The accelerometer is connected to the FPGA through an I2C serial bus (which uses the 4 signals you mentioned).
I suggest that you read the data sheet for the accelerometer chip (which can be found on the DE0-Nano CDROM). This will tell you the timing of the various signals needed to interface to the chip as well as the various modes that the accelerometer can operate in. Be warned that it is a non-trivial matter to get this working. You might want to start off by trying to write an interface to the EEPROM chip. It also uses an I2C interface, but is much simpler than the accelerometer chip.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some I2C interface modules are present in various DE0/1/2 examples. They are written in Verilog (no reason to complain, I think) and far from being instructive (really bad). As far as I remember, I2C VHDL components have been posted at the Altera Wiki, at least to control the audio chip.
Some I2C controller stuff can be also found at Opencores.org.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page