chipKIT® Development Platform

Inspired by Arduino™

Morse Code Keyer / Decoder

Created Fri, 12 Jun 2015 20:16:00 +0000 by w5uxh


w5uxh

Fri, 12 Jun 2015 20:16:00 +0000

I started playing with ChipKit boards just about one year ago. I was interested in migrating a project from the ATmega328P chip that was a combined paddle keyer + keyboard for "CW" (Morse Code). I do not expect to find much interest in such things here but thought I would post some information about my project just in case. I played with the DP32, Max32, and PICadillo along the way but the Uno32 was the best fit. I still have thoughts of supporting the PICadillo some day, but the current project uses a standard 4x20 LCD.

My ham radio interest is very narrow, high speed CW at speeds up to 70 wpm. Although we only use our "ears / brain" to copy the code at these speeds, the PIC32 chips have sufficient resources and speed to allow integrating a CW decoder into the project. The decoder part of the project is based on an Arduino project by Hjalmar, OZ1JHM.

I had very significant help from Matt Jenkins when I was getting started and I used UECIDE as the development environment. I never liked or used the Arduino environment and felt the same about MPIDE when a began experimenting with the ChipKit boards. Fortunately I ran across UECIDE in the first few days and found that it suited me perfectly. Long may it live!

Matt provided a basic 16-bit timer library that I was able to understand well enough to expand to handle the 32-bit modes. Timers and interrupts are a critical resource for generating precise timing for properly timed CW. I also was able to use a SPI RAM library he had provided to convert it to SPI EEPROM for storing user settings and "canned messages".

The attachment shows the Uno32 plugged on to a printed circuit board for the project that is still waiting for a parts delivery to be completed. I have one of the boards fully completed and in use. The PCB layout was done after first building a few perfboard breadboard versions. Some components are located on the back side of the board. The board mounts "upside down" in an acrylic enclosure and the pots and reset switch extend through the top panel so they are all on the other side, along with some of the I/O connectors.

I have been using the completed one for a few weeks "on the air" and fortunately have not yet run across any bugs. I still have some minor features to add, but it is fully functional for my normal requirements.

In case any ChipKit users have an interest in such things, this link: [url]https://sites.google.com/site/w5uxhpic32keyer/home[/url] contains more details, including a snapshot of the current code.

Chuck, W5UXH

(I had a typo in the word "Decoder" in the title. Hopefully this edit will fix it!)


Jacob Christ

Sun, 12 Jun 2016 01:48:47 +0000

Nice, thanks for sharing. I have a lab in one of the chipKIT classes I teach that will generate Morse code, but nothing to decode it.

Jacob


w5uxh

Sun, 12 Jun 2016 03:28:58 +0000

You might find this short Arduino sketch from Hjalmar more useful than my much more complex version:

[url]http://skovholm.com/cwdecoder[/url]

On an Arduino Uno running at 8 MHz (I think), it decodes reasonably well up to almost 30 wpm. I don't think I ever migrated it directly to the PIC32 boards. I tested it briefly in an Arduino, then made major changes for my PIC32 version, specifically to integrate it with the other paddle keyer and PS2 keyboard keyer functions and support very high speed.

It is possible there were some minor things in the post by Hjalmar that may have needed to be addressed, but I think it is pretty complete.

My current version now targets several additional boards, including the Picadillo and Fubarino SD, both using the SD memory card to allow sending long text files as CW. I use several of these to send CW practice over an internet VOIP server (using Mumble) and the decoder allows simple one character commands to be sent by others to control speed, select different text files etc.