string recognize and led - vhdl
This is a discussion on string recognize and led - vhdl ; Hello group,
I'm writing a code to recognize two strings of 0s and 1s base on a
Moore machine. The goal is to wait for two numbers (let's say 75). One
string will represent 7 and the other represents 5.
...
-
string recognize and led
Hello group,
I'm writing a code to recognize two strings of 0s and 1s base on a
Moore machine. The goal is to wait for two numbers (let's say 75). One
string will represent 7 and the other represents 5.
Let's say:
5= 000010000100
7= 000010000110
Now, when the appropriate string (digit) is recongnized the number
must be displayed on an LED on Altera board (DE2). I understand that
I have to add a mulitplexer to do this but the thing I am not sure
that how can I keep the number (7) intact till recognizing the next
appropriate number (5)? (other numbers must be ignored)
Do I need a latch? if this is right, then can I only simulate it using
if statement?
Regards,
ak
-
Re: string recognize and led
"Amit" <amit.kohan@gmail.com> wrote in message
news:1194495166.085775.169570@v23g2000prn.googlegroups.com...
>
> Hello group,
>
> I'm writing a code to recognize two strings of 0s and 1s base on a
> Moore machine.
Not how I would approach it, but OK.
> The goal is to wait for two numbers (let's say 75). One
> string will represent 7 and the other represents 5.
>
> Let's say:
>
> 5= 000010000100
> 7= 000010000110
>
>
> Now, when the appropriate string (digit) is recongnized the number
> must be displayed on an LED on Altera board (DE2). I understand that
> I have to add a mulitplexer to do this but the thing I am not sure
> that how can I keep the number (7) intact till recognizing the next
> appropriate number (5)? (other numbers must be ignored)
process(Clock)
begin
if rising_edge(Clock) then
if (Input_String = "000010000100") then
Led_Display <= Whatever you need to display a '5'
elsif (Input_String = "000010000110") then
Led_Display <= Whatever you need to display a '7'
end if;
end if;
end process;
>
> Do I need a latch?
A flip flop(s) to hold the data.
> if this is right, then can I only simulate it using
> if statement?
>
Why restrict yourself to only one statement type. Use the appropriate
statements.
KJ
Similar Threads
-
By Application Development in forum c++
Replies: 2
Last Post: 11-07-2007, 07:33 AM
-
By Application Development in forum labview
Replies: 1
Last Post: 09-17-2007, 11:10 PM
-
By Application Development in forum Java
Replies: 1
Last Post: 08-27-2007, 01:31 AM
-
By Application Development in forum Adobe Acrobat
Replies: 1
Last Post: 01-10-2007, 11:35 AM
-
By Application Development in forum Editors
Replies: 2
Last Post: 06-12-2006, 02:23 AM