Fsm morse code

Discussion in 'Embedded Systems and Microcontrollers' started by Rave, Nov 9, 2010.

  1. Rave

    Thread Starter New Member

    Nov 9, 2010
    1
    0
    Hello,

    I have a question, well the question is the question it self, i don't understand what they are asking for.

    Question::
    "In this part of the exercise you are to implement a Morse code encoder using an FSM. The Morse code uses
    patterns of short and long pulses to represent a message. Each letter is represented as a sequence of dots (a short
    pulse), and dashes (a long pulse). For example, the first eight letters of the alphabet have the following representation:
    A . —
    B — . . .
    C — . — .
    D — . .
    E .
    F . . — .
    G — — .
    H . . . .
    Design and implement a Morse code encoder circuit using an FSM. Your circuit should take as input one of the first
    eight letters of the alphabet and display the Morse code for it on a red LED. Use switches SW2-0 and pushbuttons
    KEY1-0 as inputs. When a user presses KEY1, the circuit should display the Morse code for a letter specified by
    SW2-0 (000 for A, 001 for B, etc.), using 0.5-second pulses to represent dots, and 1.5-second pulses to represent
    dashes. Pushbutton KEY0 should function as an asynchronous reset."

    are they asking me to the input (assuming S0,S1,S2) will be used to put in letters from A-H, then am i to display the pulses on the red led by having it flash, example for H it would blink for times, and for G, it would be on for 2* (1.5 seconds) then blink once. also they ask me to display the moorse code, it it just the red LED or do they wan't me to print A-H on the 7seg display.

    i am unsure whats being asked. can anyone shed any light on it, thank you.
     
  2. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    You don't need to display the character selected on a 7seg LED.

    Beware there should also be a time gap, length equal to the time of "dot", between dot/dash.

    This is what you are required to design.

    [​IMG]
     
    • fsm.png
      fsm.png
      File size:
      7 KB
      Views:
      251
  3. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    May I ask what is an FSM, please?

    As far as Morse code timing, here's is what I use in my programs;

    Code ( (Unknown Language)):
    1. ;
    2. ; Some general information about Morse Code Speed;
    3. ;
    4. ; <1> A Dash is three times longer than a Dot
    5. ; <2> A Dot space between Dashes and Dots within a character
    6. ; <3> A pause between characters is three Dots long
    7. ; <4> A pause between words is seven dots long
    8. ;
    9. ; The word 'Paris' was established as an international standard
    10. ; for calculating the speed of Morse in words-per-minute (wpm)
    11. ; and characters-per-minute (cpm)...  This works out to 50 dots
    12. ; (or dot times) per word and yields the following timing;
    13. ;
    14. ;  5-wpm ( 25-cpm) =  60 /  250 dots = 240-msec / dot
    15. ;  6-wpm ( 30-cpm) =  60 /  300 dots = 200-msec / dot
    16. ;  7-wpm ( 35-cpm) =  60 /  350 dots = 171-msec / dot
    17. ;  8-wpm ( 40-cpm) =  60 /  400 dots = 150-msec / dot
    18. ;  9-wpm ( 45-cpm) =  60 /  450 dots = 133-msec / dot
    19. ; 10-wpm ( 50-cpm) =  60 /  500 dots = 120-msec / dot
    20. ; 15-wpm ( 75-cpm) =  60 /  750 dots =  80-msec / dot
    21. ; 20-wpm (100-cpm) =  60 / 1000 dots =  60-msec / dot
    22. ; 25-wpm (125-cpm) =  60 / 1250 dots =  48-msec / dot
    23. ; 30-wpm (150-cpm) =  60 / 1500 dots =  40-msec / dot
    24. ; 35-wpm (175-cpm) =  60 / 1750 dots =  34-msec / dot
    25. ; 40-wpm (200-cpm) =  60 / 2000 dots =  30-msec / dot
    26. ; 50-wpm (250-cpm) =  60 / 2500 dots =  24-msec / dot
    27. ;
    28.  
     
  4. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    I'm guessing finite state machine.
     
  5. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Is the OP using a microcontroller? I've got a few microcontroller based Morse players. I wonder which part of the program would be implemented as a "state machine" though?

    Cheerful regards, Mike
     
Loading...