Forum Discussion
Altera_Forum
Honored Contributor
10 years agoYes, Nios will be perfectly capable of hosting the I2C interface to the G-sensor. However, Nios is a soft core processor that sits in the FPGA fabric. The DE0-Nano-SoC features a Hard Processor System (HPS). This is very different to Nios.
--- Quote Start --- There is a tutorial that uses Linux. It puts the Linux OS on the SD card and then uses the Accelerometer --- Quote End --- This will be running Linux on and hosting the accelerometer from the HPS. You suggest this is a round about way of doing it. It simply means you'll be running your software on the HPS rather than Nios. Whilst there are huge processing benefits from this (which you don't need) and it supports I2C natively, it's another set of tools to understand. You will also have to interface to the FPGA fabric, from where the LEDs are hosted, to control them. You can do what you're suggesting, on that development kit, using Nios. However, as the I2C interface is hosted from the HPS you'll need to map that peripheral to the fabric, where your Nios will be. This App Note: mapping hps ip peripheral signals to the fpga interface (https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/an/an706.pdf), describes how to do this. You'll also have to implement the I2C peripheral yourself or buy/use a third party one - Nios doesn't come with one. Assuming you're familiar with Nios then I suggest you go that route. As for a 'procedure to make use of those registers', that'll depend on how you implement the Nios I2C peripheral. Cheers, Alex