- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am a newbie with NIOS. I was able to successfully run the "hello world" program on my board... I was just wondering if there is some type of documentation on the internet that will teach me how to program C++ in the Altera Board... for example: 1) How can I take the input from an IO pin in the board 2) How can I output a signal to one of the pins... If someone can help me out, I would emmensely appreciate it... thanks, Aydin Y MirzaeeLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your Nios documentation, there is a chapter for each of the various peripheral devices. The one you're looking for is the PIO device. You need to add a PIO device to your SOPC project, then look in the system.h file in your system library to find the definition of the PIO's base address. Then, in your main, you'll have some code like this:
# include "system.h"# include "altera_avalon_pio_regs.h" ... IOWR_ALTERA_AVALON_PIO_DATA(PIO_0_BASE, 0); // Base address and value.
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