Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHello,
I've been doing some other stuff and I am now back to my button design. I checked my pin assignments (they are fine) and my base addresses for PIOS in SOPC and the ones in "system.h" matches. I tried the easy program below and when I press the button, nothing happens. It seems that there is still another connection problem but I don't know which one. int alt_main (void) { alt_u8 button = 0x2; while(1){ button = IORD_ALTERA_AVALON_PIO_DATA(PIO_0_BASE); if (button==0x01) printf("button 1"); } return 0; } Thanks for your patience, Myriam