As an exercise I've programmed a PIC to work as a CW keyer. I'm no speed merchant so the analog pot that controls the speed goes from 12 WPM to 24 WPM and , so far, everything appears to be working so there are no bugs in my code.

Now, how do I introduce CW memories into my program?

One option is to 'sample' the output of the keyer every (say) millisecond, and just save the output as a string of ones and zeros, this will require 1K per second of storage and isn't very efficient as I'm recording a lot of dead time such as word gaps. Another option is to tap into the keyer program and record dots and dashes separately, maybe different binary values for a dash and a dot. The keyer would automatically insert the spaces between elements but I have no idea how the gaps between letters and words could be interpreted as the speed is variable.

Looking back in this CW forum for entries with zero replies, and you just popped up.

Realize that nearly all hams buy their equipment, and they are not bothering abt design problems.

The ITU permits amateurs to use frequency bands with the purpose of self development, explicit not to spent the frequencies for Citizens Band chit chat nor for doing contests with 599 untrue reports. When you give a true report in a contest unequal to 599 you are classified as "lid".

Your question:

When you enter the message in your paddles, the PIC has to decode them, that is easy because speed is known, and you save them as ASCII characters OR as CW code, one character per byte, usual code is a 0 for a dot a 1 for a dash and a final 1 for end of character. Binary notation 10000000 is an empty character (only the final closing 1).01100000 is an A (dot dash final one)10001000 is a B and so on.

Transmission is programmed in your PIC by rotating the byte left via carry, when the carry is zero a dot with accompanying intercharacterspace is transmitted when the carry is 1 a dash with te accompanying intercharacter space is transmitted and when te shifted byte is 10000000 the transmission inserts a letter space.

Copyright 2000-2015 eHam.net, LLC
eHam.net is a community web site for amateur (ham) radio operators around the world.
Contact the site with comments or questions.
WEBMASTER@EHAM.NETSite Privacy Statement