You must demonstrate your program to your TA during your laboratory session on Tuesday, November 4. This part of the assignment is worth 25 points.
Morse code is a representation of the letters, digits and punctuation characters by sequences of short and long bursts of tone. It was originally developed for transmission over telegraph lines, and was later used for radio transmission. Although its use has diminished with time, proficiency is still a requirement for most amateur radio operator's licenses. An interesting sidelight is that Morse code identification is transmitted by radio navigation aids used by aircraft, and until recently Morse code proficiency was required for instrument-rated pilots in Australia.
The basic timing element of Morse code is called a unit, and is the length of the short burst of tone. The long burst of tone has a length of three units, and the silence between tone bursts has a length of one unit. A minimum of three units of silence separates characters, and a minimum of seven units of silence separates words.
Morse code transmission rates are measured in words per minute, with the ``standard'' word being ``Paris''. In other words, a speed of 20 words per minute involves transmitting ``Paris'' 20 times in one minute. In the table below, a short burst of tone is represented by a dot and a long burst of tone is represented by a dash. If we count the units making up the word ``Paris'', including all of the silences, we find that there are 52. Thus a code speed of 20 words per minute involves transmission of 1040 units per minute.
When one is learning Morse code, it is extremely important to realize that it is an audible, not a written form of communication. You cannot achieve any reasonable proficiency by learning the patterns of dots and dashes given in the table below. Instead, you must learn the sound of the character, just as you learn the sound of a song. When learning code, the standard audible presentation of each character is the sound that character would have if the message were being transmitted at 20 words per minute. This standard requires that the length of a unit be about 58 milliseconds (1040 units per minute). The period of silence between characters is adjusted to produce a transmission rate compatible with the student's proficiency.
The frequency of the tone used for the short and long bursts is somewhere in the 800-1000 Hz (cycles per second) range. If the tone were exactly 1000 Hz, then each cycle would require 1 millisecond and a short burst of tone for code practice would consist of 58 cycles.
|A: .-||J: .---||S: ...|
|B: -...||K: -.-||T: -|
|C: -.-.||L: .-..||U: ..-|
|D: -..||M: --||V: ...-|
|E: .||N: -.||W: .--|
|F: ..-.||O: ---||X: -..-|
|G: --.||P: .--.||Y: -.--|
|H: ....||Q: --.-||Z: --..|
|I: ..||R: .-.|
Your program must accumulate a complete line of text (which might, of course, be only a single character) before doing any translation. It should then output the Morse code for the entire line. You may place a 136-character limit on input line length, and it is up to you whether you allow editing by means of backspace characters.
The Morse code output for a line should conform to the specifications given above with respect to tone frequency and character timing. It must provide the appropriate separation between characters and between words. Remember that the lengths of the silences are tied to length of a unit, which is the time it takes to output a short tone burst. One easy way to create a silence of the appropriate length is to design the output routine to take the D/A converter address as a parameter. When you want to hear a tone, supply the correct D/A converter address as the argument; when you want to hear silence, supply an address that isn't connected to anything.
This assignment requires you to make several important design decisions:
|Instructor||Revision 1.44 (2007/08/27 00:15:44)|