flashing a led

May 07, 2006 8 Replies

I have a little problem with flashing a led.



I want flash a led for indicating the status of my program.



I do the following:



LED1


Jep schrieb:

Whats wrong with a counter?

You do know that the above statement is for simulation only and can not be synthesized in real hardware?

Regards Falk

If it burns, it has too much forwar current, try instead:

LED1

Or does '0' turn the LED on?

... because the 2nd part of the code line is ignored.

Whats wrong with counters?

Ralf

Thanks for all your support.

I do it now with counters, and it works :-)

A counter has a clock by definition. The clock is the signal you are counting. It either comes in from the outside, or you can generate an internal clock bty means of a string of buffers plus one inverter, connected back to the input ( a ring oscillator) The frequency stability is bad, + or - 50%, but in some cases (like this one) nobody cares. Anything between 1 kHz and 100 MHz would do the job. Peter Alfke

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required