Altera_Forum
Honored Contributor
16 years agoUser LEDs 2 - 4 on NEEK, Cyclone III
NEEK Cyclone III
cycloneIII_3c25_niosII_standard_sopc.sopcinfo How do I blink LEDs 2 - 4? Below code blinks LED1. Also, any references to documents where I could have figured this out by my self would be extremely useful. Thanks.# include <stdio.h># include "system.h"# include "altera_avalon_pio_regs.h"
int main()
{
printf("Hello from Nios II!\n");
int count = 0;
int delay;
while(1)
{
IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, count & 0x01);
delay = 0;
while(delay < 2000000)
{
delay++;
}
count++;
}
return 0;
}