Forum: FPGA, VHDL & Verilog Knight Rider VHDL

von Elton Saraçi (Guest)

Rate this post
not useful
Hello guys!
I am trying to do some sort of "Knight Rider" car with VHDL, using my 
Artix Board. Right now I have learned how to shift a single bit from 
left to right and vice versa. The issue is when I try to add the tail 
and use the PWM technique to control the intensity of light from one led 
to another. It all gets messed up when I use long tails. Anyone who has 
experimented something similar before? I would be glad if anyone shared 
any idea on how can we deal with such cases:).

von Ale (Guest)

Rate this post
not useful
If you write down how each light has to behave in every situation, maybe 
you understand how is to  be implemented. First try without PWM, and the 
add the PWM.

The moving of the light can be done with a folding counter, you count 
from 0 to 7 with 3 bits and map 5 to 3, 6 to 2 and 7 to 1. A shift 
register can also be used, you shift left and right you need 5 bits.
Fading of the light can be done afterwards, one more counter per light 
that gets loaded when the light has to turn on.

write it down, it will make sense.

von Lothar M. (lkmiller) (Moderator)

Rate this post
not useful
Here's a kind of step by step solution:
Try Google translate, its German.

von Dussel (Guest)

Rate this post
not useful
There is an example project for the MAX1000 board, which also creates 
such a light. You can look at the code there.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.