progrmming logic for vhdl

Status
Not open for further replies.

gauree

Newbie level 1
Joined
Jul 9, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
hi...
i want to know the logic for written the program in vhdl for continuously rolling LED's.
 

You have to -shift- some data.
Some pseudo code:
Code:
signal  LEDS : std_logic_vector(7 downto 0);
LEDS <= LEDS(0) & LEDS(7 downto 1);  -- Rotate
 
Reactions: gauree

    gauree

    Points: 2
    Helpful Answer Positive Rating
The easiest and most flexible way to do that is to design a FSM, in which each state defines which are the LEDs to turn on and which to turn off. In this way you can create any desired pattern just by changing the next-state logic. Be aware of the frequency of states change, since human eye would not see any change if this frequency is too high.

Cheers
 
Reactions: gauree

    gauree

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…