Forum Discussion
Altera_Forum
Honored Contributor
15 years agodefining Qsys input on DE0
Hi, I'm new to embedded processor development and a novice in C and C++ programming. I'm working on design for a senior project, and am currently using a DE0 development board with quartus 11.0 a...
Altera_Forum
Honored Contributor
15 years agotry this code.
when you run the code, press button / switch. each return value on PIOi represent condition of button / switch. try it anyway. //-------------------------------------------------------------------------------- # include <stdio.h> # include "system.h" # include <io.h> int main() { unsigned char PIOi; PIOi = IORD_8DIRECT(LED_BASE,0); printf("NiosII's got 0x%02X\n",PIOi); return 0; } //--------------------------------------------------------------------------------