Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- In Nios program. Say you have a spare PIO port named led_out, possibly connected to LEDs. Then you can toggle the first pin by calling periodically this function:
# include "altera_avalon_pio_regs.h"
void PIO_pin_toggle(void)
{
alt_u8 pio;
pio = IORD_ALTERA_AVALON_PIO_DATA(LED_OUT_BASE);
IOWR_ALTERA_AVALON_PIO_DATA(LED_OUT_BASE, pio ^ 1);
} This way you can easily monitor if your Nios program starts, keep running or hangs at some time. Regards Cris --- Quote End --- thank you cris, i ll try this and let you know the result.