Forum Discussion
Altera_Forum
Honored Contributor
13 years agoneed help in c code for communication between Nios ii processor and custom component.
hi , i am done with my qsys design . now i want to move to the next steps. i wan to send data from my nios II processor to the custom Component ( encoder) , i created. can any one suggest me any ...
Altera_Forum
Honored Contributor
13 years agoho about
///////////////////////// c code (^v^ )///////////////////////////////////////// # include <io.h> # include <system.h> ..... short pio_button; pio_button = IORD_16DIRECT(PIO_BUTTON_BASE,0); IOWR_16DIRECT(PIO_LED_BASE,0,pio_button); /////////////////////////////////////////////////////////////////////////////////// IORD_16DIRECT is reading register from address of PIO_BUTTON_BASE IOWR_16DIRECT is writing data to PIO_LED_BASE those base addresses are written in <system.h> serch IOWR_*DIRECT functions