Forum Discussion
Altera_Forum
Honored Contributor
15 years ago2 Leds -> how many PIO?
Hi all, I'm writing a simple program on interrupt behaviour, with an interval timer (that generate timer interrupt and its handler make a ledg blink) and an hardware interrupt generated by a bu...
Altera_Forum
Honored Contributor
15 years agoLED_PIO_BASE is 2 bit wide so it can control both the LEDs. if you want both the LEDs to blink together, try this code:
IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, 3); delay(500000); IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, 0);