Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- but now I wonder why 'delay' is not declared in the Altera tutorial as volatile? --- Quote End --- Possibly because the original author was using a different version of gcc, or had optimization turned off ... or left it out as a lesson to the user :) --- Quote Start --- Is there a better way to do this - a timer implemented in the NIOS processor? --- Quote End --- That is one way. Another way is to create an Avalon-MM slave hardware component to generate pulses (a pulse width modulator) and use that to control the LED. Ultimately it depends what you are trying to learn. Finding all the different ways to blink LEDs will keep you busy for hours :) Cheers, Dave