Forum Discussion
Altera_Forum
Honored Contributor
12 years agoLED toggle
I'm trying what I thought would be a very simple programme to turn alternate LEDs ON and OFF every half second, but it isn't working as it should. It starts off OK, with the LEDs toggling about every...
Altera_Forum
Honored Contributor
12 years agolast post:
I tried again with just 1 LED, with similar results. The blink rate is about right to start with, then it increases. It seems that the LED is ON for the same amount of time, but the time for which it is OFF keeps increasing. The simplified code snippet I tried is :- wait until (clk'event) and (clk='1'); result <= result + 1; if result < 2500000 then LED0<='1'; elsif result=49999990 then result <=0; else LED0<='0'; end if;