Knight Rider VHDL

Guest #6641456
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:).
Guest #6641503
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.
Guest #6641617
There is an example project for the MAX1000 board, which also creates 
such a light. You can look at the code there.

Reply

A question of your own? This thread is over 5 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.