A New Old Project & The Silent Annniversary
I’ve decided to take on a “new old” project and port my PIC keyer code to the Arduino platform. I use the word “port” loosely as the Arduino offers many higher level features and libraries, and I will be programming in C rather than the PIC’s native assembly code. I know I’m about two years late to the start of the “Arduino party”, but from what I’ve read it looks like the party is still going strong with new people joining the fun everyday.
I started writing the PIC keyer about 10 years ago, first starting with PICBasic. It quickly became apparently that PICBasic, while easy to get started with, produced much too bulky to pack in the features I was looking for. This is often the case with high level languages. I went on to assembly and ended up making a full blown keyer with memories, straight key and bug modes, variable weighting, code practice mode, a frequency counter, and several other features. I look back at the code and can’t believe some of the stuff I did. I think my two biggest accomplishments were writing and debugging the frequency counter code and making the variable frequency sidetone output while simultaneously doing other functions without the benefit of interrupts and multitasking. Some of this code is just pure magic and trying to figure it out today I find myself cursing the younger me who was more clever and diligent than the older me today.
The PIC will always be my first love, but I’m ready to move on. Despite having written very modular and readable code with lots of comments, it’s a major undertaking adding new functionality to this assembly code, especially when I don’t look at the code for months at a time. Also, I was often having to deal with memory limitations, and when porting the code to bigger chips with more memory I had to deal with memory page issues. While I could spend the money to get a C compiler for the PIC, it just doesn’t make sense with the popularity of the Arduino platform. And with all the modules you can get for functionality like memory cards, Ethernet interfacing and wireless networking, there’s just much more potential for growth, doing cool stuff, and reaching a larger user audience. These days I would rather spend my time making a chip talk over TCP/IP than figuring out how to stuff more assembly code into 500 bytes of remaining memory just to do something like blink an LED.
I expect porting the main CW keyer functionality over to the Arduino will be much easier than the initial PIC development was due to the Arduino’s interrupt capabilities. Also, the Arduino library has a sound generation library that appears to operate “in the background” while the main code is running. This is heaven compared with what I had to go through to get sidetone output to work while not missing a beat with CW element timing on the PIC.
I’m awaiting an Arduino board to arrive in the mail; hopefully the fun will begin later this week. I’ll be posting my progress here.
And on a somewhat related note, it never seems to get reported by “mainstream” amateur radio media, but Sunday, February 13th will be the four year anniversary of the elimination of code test in the US. Please turn on your rig, start at the lower edge of your favorite HF band, run the VFO up through the band, and listen to all the CW (OK, ignore the RTTY this weekend). If the spirit moves you, why not have a CW QSO? Remember – CW is alive and well because of us, not a test.