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 agoThank you all for your answers!
I've just some other questions to be sure to have understood: @shahzad in your code the LEDS blink together, but if i want manage them separately?i should use "2" for the second led and "1" for the first? example: LED1 IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, 1); delay(500000); IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, 0); LED2 IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, 2); delay(500000); IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, 0); or that solution works only with Cris72's code? (I've 2 different interrupt, and i want use one led in each handler) @Cris72 what you mean exactly with "configured your PIO for individual bit setting"? 2 bit-->2 output pin? @dsl you mean that if i ever use a single led the best solution should be one LED one PIO?