Re: string recognize and led




"Amit" <amit.kohan@xxxxxxxxx> wrote in message
news:1194495166.085775.169570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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


.



Relevant Pages

  • Re: Display contents of text file in the Browser
    ... It sounds like your app is attempting to read from the file at the same time ... that it is writing to it, ... process and attempting to read the file and display it at the same time. ... memory, and return that string to the client, while launching a separate ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A Simple BMP Converter
    ... "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal ... Private Sub cmdSysInfo_Click ... Open Registry Key ... > color bar in the color display. ...
    (comp.lang.basic.visual.misc)
  • Re: help collecting data.
    ... Dim GetC As String ... the code in the cell that I want the order numbers(info from column C ... "Otto Moehrbach" wrote: ... display them both, seperated by a comma ...
    (microsoft.public.excel.misc)
  • Re: Output data from multiple records in a table
    ... > Dim rsR As DAO.Recordset ... > Dim strSQL As String ... > such as display it in a textbox on your form. ...
    (microsoft.public.access.modulesdaovba)
  • Need help with GridView and LDAP/GC
    ... I could do the search with GC, and then lookup more ... DirectoryEntry searchRoot = new ... // Add search string if specified. ... // Display Name ...
    (microsoft.public.dotnet.framework.aspnet)