Forums

Assembly language - Morse Code copy

Started by Calamity Jane October 13, 2004

Does anybody remember seeing an Assembly language program for
receiving Morse Code?

I have an application and am lazy enough not to start from scratch if
I don't have to.

Copying machine generated code isn't too hard but copying human-sent
code needs to be a little more sophisticated.....

Thanks Group!



I have seen a fairly extensive program for a 6800. I had a student
attempt to update the send portion of the code for 68HC11 but he stopped
attending class.

Emmett Redd Ph.D. mailto:
Associate Professor (417)836-5221
Department of Physics, Astronomy, and Materials Science
Southwest Missouri State University Fax (417)836-6226
901 SOUTH NATIONAL Dept (417)836-5131
SPRINGFIELD, MO 65804 USA

> -----Original Message-----
> From: Calamity Jane [mailto:]
> Sent: Wednesday, October 13, 2004 3:04 PM
> To:
> Subject: [m68HC11] Assembly language - Morse Code copy >
> Does anybody remember seeing an Assembly language program for
> receiving Morse Code?
>
> I have an application and am lazy enough not to start from scratch if
> I don't have to.
>
> Copying machine generated code isn't too hard but copying human-sent
> code needs to be a little more sophisticated.....
>
> Thanks Group! >
> ------------------------ Yahoo! Groups Sponsor > Yahoo! Groups Links >





In a message dated 10/13/04 4:14:46 P.M. Eastern Daylight Time,
writes:

Does anybody remember seeing an Assembly language program for
receiving Morse Code ========================
look for fftmorse on simtel.com..... guy from montreal does an fft to detect
the beep!


>
> Does anybody remember seeing an Assembly language program for
> receiving Morse Code?
>
There are a number of products, especially in the Amateur Radio market that
accomplish this task with varying degrees of success. Those that have
created them tend to keep them very closely held.

> I have an application and am lazy enough not to start from scratch if
> I don't have to.

Good thinking!

>
> Copying machine generated code isn't too hard but copying human-sent
> code needs to be a

>>> 'little more sophisticated' <<<

Certainly a candidate for the 'understatement of the week' award.

In my collection of things that "I'll never look at again before I die" at
my family home in Illinois is a copy of a circa 1950 Popular
Science/Mechanics magazine that had a short article on a new Air Force
computer. IIRC it was something in the IBM 140n class boasting a whopping
8K of RAM memory with planned expansion capability to 16K to enable the
solution of "larger problems". An example of one such 'larger' problem was
the parsing, interpretation and inter-translation of all dialects of human
speech, a problem that their experts calmly clamed would be solved within
one year of the installation of the expanded memory module !!!!!!!

The ability to equal human performance in the interpretation of Morse Code
seems to be a similar problem. After 30 years as a licensed Amateur, I have
yet to see a software based interpreter that can closely approximate the
human year under real operating conditions even though the problem has been
under attack since the advent of such machines such as a the C64 and the
Apple II.

I question your claim to having found a 'real' application. To the best of
my knowledge, human ear telegraphy has been dropped from all radio
communications including, now and sadly, Amateur radio. Even if you have
identified an application for the reception of human sent code, it will
surely fade into the distant horizon in the matter of a few years.

As far as the reception of machine sent code is concerned, this problem has
long since been solved. We call it 'radioteletype' (or other data
transmission modes such as TOR or AMTOR.

However, if you are determined enough to continue your investigation, here
are a few of the major aspects of the problem I identified while messing
with it about a decade ago. You will need at least the following functional
blocks:

1. A 'mark/space discriminator'. Sometimes referred to as a 'bit slicer'.
This a simple problem with S/N ratios above at least 10 db. At around 6 db
the problem becomes exponentially more difficult as you try to filter signal
out of interfering heterodynes and static crashes, etc. Remember the well
trained human ear can pull decent Morse out of around -6 db SO/NO.

2. Time base recovery. Another nasty problem somewhat related to the one
above. The recovery of Morse under marginal conditions requires the
application of what I call 'predictive / adaptive' techniques. For proper
interpretation, your program must know when to expect the next bit of code
and must be able to rapidly and flexibly adapt to changes in the sending
operators 'fist'.

3. Code element, character, and word separation. The fundamental element
of Morse timing is the 'dot'. It is one timing element long. For
_properly_ _sent_ Morse, the 'dash' is then three elements long and the
inter-element space between dots and dashes is one element. The
inter-character spacing is three elements and word to word spacing is 7
elements.

A good discussion of these and other concepts of properly sent Morse can be
found at --

http://en.wikipedia.org/wiki/Morse_code#Timing_and_representation

At the bottom of this web page you will find several links to Morse Code
Translators and interpreters including some which are listed as "open
source".

4. A word interpreter (dictionary). The human brain has an amazing ability
to fill in missing or incorrect letters and words in human speech. (Some
say and 'excessive' ability, often leading to miss-hearing and/or
understanding as the brain fills in the expected or "hoped for" response in
human exchanges.

Have fun!!! This one will keep you awake nights for a long time!!

A historical note:

There was an effort underway 20 years or so ago to develop a communications
mode called CCW or 'Coherent CW' by sending Morse at a (relatively slow)
rate of about 10 baud (about 2 words per minute). The timing of the
transmission and expected reception was to be based on world standards then
in place and needed a time base accurate to about one millisecond, a bit of
a challenge back then. Those familiar with communications theory will
understand that this is a coherent reception scheme using matching filter
techniques which could result in remarkable recovery of messages under
really abysmal reception conditions. The establishment of a one ms time
base world wide would be almost trivial today using GPS facilities.

Oh, btw, forget the 'HC11 for this application if you plan to do it all in
software. Get yourself at least a low-end DSP chip. The 'HC16 might be a
candidate with its DSP assist add-ons. >
> Thanks Group!
>

--- Avoid computer viruses, Practice safe hex ---

-- Specializing in small, cost effective
embedded control systems --

http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith
Smith Machine Works, Inc.
9900 Lumlay Road
Richmond, VA 23236 804/745-2608
----- Original Message -----
From: "Calamity Jane" <>
To: <>
Sent: Wednesday, October 13, 2004 4:04 PM
Subject: [m68HC11] Assembly language - Morse Code copy >
> Does anybody remember seeing an Assembly language program for
> receiving Morse Code?
>
> I have an application and am lazy enough not to start from scratch if
> I don't have to.
>
> Copying machine generated code isn't too hard but copying human-sent
> code needs to be a little more sophisticated.....
>
> Thanks Group! > --
------
> Yahoo! Groups Links
>
> a.. To




Bob (Smith), thanks for your comments. I am also a Ham (VE4DI).

My application isn't as sophisticated as copying code from a radio -
it is to send commands to a uP module from a key over a twisted pair,
so I don't have to do all the signal discrimination. Using the ICI it
is easy to detect the on and off times cleanly.

The basis of the copy software would have to be the software
equivilent of a PLL to approximate and track the element time. From
there, it would be a matter of compairing each received mark/space to
decode the character along with adjusting the "PLL" time.

I agree that copying from a radio is a challenge!

Dianne




Calamity Jane wrote:

>Bob (Smith), thanks for your comments. I am also a Ham (VE4DI).
>
>My application isn't as sophisticated as copying code from a radio -
>it is to send commands to a uP module from a key over a twisted pair,
>so I don't have to do all the signal discrimination. Using the ICI it
>is easy to detect the on and off times cleanly.
>
>The basis of the copy software would have to be the software
>equivilent of a PLL to approximate and track the element time. From
>there, it would be a matter of compairing each received mark/space to
>decode the character along with adjusting the "PLL" time.
>
>I agree that copying from a radio is a challenge!
>
>Dianne

Hi all (hams), hi Dianne

I have a mosecode copy program part (actually it was part of a
"Multimode TNC" project(68HC11 + TI DSP) developed 10yrs ago ...running
all modes like PACTOR,AMTOR,RTTY,SSTV, 9k6 Packet Radio etc.) and it is
very simple but with speed recognition and speed adaptive ...a ham
friend of mine did write it. If you are interested I can send it.
Filtering of the audio and demodulating is not part of this program snipsel.

Regards
Walter
DK1BN P.S. copying CW from a radio is what I like ...CW is a never ending
challenge and much fun ....