Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Simple question

Altera_Forum
Honored Contributor II
1,219 Views

Please, help me... 

 

1) I created new project in Quartus II 4.1 

2) then I opened Altera SOPC builder and I added Nios II processor, Pio ( input and output) and OnChip_Memory (RAM) 

3) then I created new project in Nios II IDE - Hello Word. The software generated C file with single function main(). 

Now I'd like to do something inside this function : to write data via output pio.. 

When I used previos version Nios (3.0) I just used header file excalibur.h, where all system parameters were defined. I see, that Nios II IDE generates system.h But I can't understand how to use this assignments.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
530 Views

Hello Kira, 

 

If you have designed Nios systems in the past and you would like to take Nios II for your next projects you should read the Application Note 350 first (“Upgrading first-generation Nios processor systems to the Nios II processor”, Step 4 at page 22). 

 

Here is a simple example for giving out some data to a PIO: 

 

IOWR_ALTERA_AVALON_PIO_DATA(SEVEN_SEG_PIO_BASE, bits); 

 

These includes are necessary:# include "system.h"# include "altera_avalon_pio_regs.h" 

 

 

Bye, 

niosIIuser
0 Kudos
Altera_Forum
Honored Contributor II
530 Views

Thank you, OK!

0 Kudos
Reply