Break the Morse Code Speed Barrier!

20130602 edit: Nokia 51xx display code posted here: Arduino Magic Morse with Nokia 84x84 display (Minty Magic Morse) - Exhibition / Gallery - Arduino Forum

Disclaimer:
I am the author of the Magic Morse (PICAXE) project sold by Jameco. Magic Morse is also discussed in various Instructable articles.

The attached code is Arduino and represents my implementation of the Magic Morse decode algorithm within the timing windows defined by raron in his Arduino implementation of his Morse Code encoder-decoder:
http://raronoff.wordpress.com/2010/12/16/morse-endecoder/
http://code.google.com/p/morse-endecoder/wiki/Usage

The code presented is only a decoder. It is designed to be a minimalist implementation using very inexpensive components: parallel LCD, piezo sounder, two LEDs and current limiting resistors. Pinout for the 328 uC can be found in the Notes.h section in the attached ZIP.

IF you are serious about getting over the normal learning WPM for Morse Code, I recommend you locate and purchase a good Morse key... I use a SpeedX obtained from a Hamfest boneyard sale. Often, nice keys can be found on eBay. There is one source for a $10 "training" key: Willy's Electronic.

To initially set the "WPM", simply hold the Morse key "closed" through the 2 second credits window. Select a new value with the Morse key (longggg press of key to write to EEPROM.)

NOTE: I use the LiquidCrystal.h library; BUT I do deviate on the wiring (because it makes wiring a Mini-Pro as a backpack on the rear of a LCD nicer!

LiquidCrystal lcd(7, 6, 2, 3, 4, 5);  // BEWARE: does not match Arduino Examples

Have fun. Compiled with 1.0.5 and tested on UNO, bareboard, Mini Pro, and Nano.

Ray

NOTE: You must be a forum member AND signed-in to see the attachment (and to download same!)

Magic_Morse_V8a.zip (8.28 KB)

Some additional details about the Arduino Magic Morse version 8a:

As stated in the main post, the user can set the Morse Code timing from 5 WPM to 40 WPM. The characters "PARIS" are sent to the LCD at the currently selected speed to give the user a sense of what perfect keying would sound like. The user may install a momentary pushbutton switch to physical pin #16 (D10 in Arduino speak) to force the uC to regurgitate "PARIS" at will.

Physical pin #15 (D9) can be left open or it can be closed to ground. If grounded, the serial TTL output which is echoed for a terminal (default 9600 BAUD) generates a character-by-character timing of every element keyed at the selected speed. Below is a sample with explanation:

Credits:

(c) 2011 - 2013 by M. R. Burnette
Free RAM available: 1683
WPM: 12
DIT: 100 mS  DIT range:   >  25 < 150 mS
DAH: 300 mS  DAH range:   >= 150 < 400 mS
Char Break:  >= 300 < 700 mS
Word Break:  >= 700 mS

Printing PARIS on LCD display:

PARIS

User keying display with D9 at Gnd:

 .(88) -(256) -(340) .(105) P.(82) -(342) A.(96) -(358) .(100) R.(98) .(143) I.(114) .(98) .(108) S \
Dit Avg = 103[100]  Dah Avg = 324[300]

What the diagnostics show is that a perfect DIT should be 100mS at 12WPM and a perfect DAH should be 300mS. However, we are also advised that the software will produce a DIT for a key closure from > 25mS < 150 mS and the software will produce a DAH with a key closure of >= 150mS < 400 mS. Then when I keyed PARIS using the Morse key, every element is displayed as a DIT "." or a DAH "-" along with the mS timing for that particular element as it was decoded. Finally, all of the DITs are averaged and all of the DAHs are averaged. The intent here is to show where are error is located in the decode process (user keyed incorrectly) and the overall rhythm of the operator on the whole. In the example, my DITs are pretty close at 12WPM but I tend to be about 10% long on the DAHs on an average. Detailed inspection, however shows that I am much more inconsistency in my timing.

Ray