The WW2R MULTI MESSAGE KEYER

Dave Robinson WW2R, G4FRE


 

Commercially made PCBs are available for the design from WA5VJB in the USA and G4DDK in the UK. PCB, full kits and programmed chips are still available from WW2R

Introduction

Since publication of the original WW2R PIC keyer there has been a few requests for a version of the keyer that allows the user to select one of 4 programmed message rather than being restricted to just one message. This article describes this new version.

Instead of the original  PIC16C505 Microcontroller chip by Microchip the 16F630 chip has been chosen. The main reason for the change was the increased ease of memory block manipulation compared to the 16C505. It has 64 x 8 registers, 11 I/O pins and 1024 x 14 program area, all contained in a 14 pin DIL package. As the chip is flash programmable development can be done on the chip itself rather than having the inconvenience of having to use the EPROM erase/program sequence. It also allows the messages to be changed in the chip at a later date.

Three elements of the keyer design have to be considered:-

1. A method of converting the morse to a bit pattern for each of the 4 messages.

2. The microprocessor code for the PIC chip to convert this pattern to a morse output

3. The hardware

Element 1 will vary depending on the four messages to be sent. Element 2 (the "program") is independent of message. The two elements are generated separately, then combined together in MPLAB then they can be blown into the chip from the same program. 

Morse code pattern generation

Whilst others have developed elegant solutions to store CW as binary bits, the method presented here is based on my original design in Radio Communication. One message pattern is stored serially in each chip with an invalid morse character being used to generate the reset to the start of the message (11001100 binary; CC in hexadecimal) to allow continuous looping.

To start the conversion process first write down the text of the message to be sent. Convert each character in the message to binary representation of the morse. A dah equates to "111", a dit to a "1", a character space "0"a letter space "000" and a word space "0000000". If periods of "key down" are required continuous streams of "1"s are inserted. If periods of "key up" are required continuous streams of "0"s are inserted. The bits are then converted to hexadecimal, padding out the message length with extra "0"s to complete a Byte as necessary. The end of message byte (CC) is added to complete the code.

For example suppose the message just consists of the callsign WW2R. The binary listing would be as follows:-

10111011 10001011 10111000 10101110 11101110 00101110 100000

this is converted to hexadecimal:- then the reset sequence added;-

BB 8B B8 AE EE 2E 80 BB 8B B8 AE EE 2E 80 CC

Whilst this process is easy to do for short message it is very tedious and prone to errors for long messages. For this reason a QBASIC program was developed to generate the sequence automatically and generate a text file in a compatible format for the PIC assembler. The program is cwpic.bas available in zipped form as cwpic.zip. The program also allows the simulation of the sound of the keyer to be made so you can make sure it sounds correctly before committing it forever in the chip. As an example of the storage capacity of the chip, the following message fits in one of the 4 message areas:-

WW2R EM13QD 902.380MHZ (10 seconds carrier) WW2R (10 seconds carrier) WW2R (10 seconds carrier) WW2R (10 seconds carrier) WW2R (10 seconds carrier)

Microcontroller code

No claims of code compactness are made for this program, ease of comprehension on how the program works being traded for the niftiest code. It was decided to have two independent keyed outputs from pin 10 to drive a keying transistor and pin 7 to drive an LED. The speed of the keying is controlled by a potentiometer and fixed capacitor.

The code was developed using the free MPLAB IDE development software and chips programmed with the Picstart Plus programmer.  The zip file  cw630.zip is the Microchip assembler dialect of the program.

Process overview

1. Generate the morse code for message 1 using the QBASIC program. Rename the output file msg1.asm.

2. Generate the morse code for message 2 using the QBASIC program. Rename the output file msg2.asm.

3. Generate the morse code for message 3 using the QBASIC program. Rename the output file msg3.asm.

4. Generate the morse code for message 4 using the QBASIC program. Rename the output file  msg4.asm.

5. Ensure the msg*.asm files are in the same directory as cw630.asm. Assemble the file CW630.ASM using MPLAB. The message files will automatically be incorporated into the output file

6. Program the chip from within MPLAB.

Hardware

The circuit diagrams is shown in Figure 1. The component overlay is shown in Figure 2.

A small commercially PCB, produced by WA5VJB  is shown in Figure 3.. Note that the IC1 pin which has a square pad on the PCB is PIN 14. (it is usually pin 1). This was designed for the original single message keyer, but can be used for the multi message version by soldering wires to the message select pins (13,12,11). Earthing pin 13 selects message 1.Earthing pin 12 selects message 2. Earthing pin 11 selects message 3. Earthing no pins selects message 4. The pins are only checked at the start of each keying sequence.  The component list is shown in Table 1 at the end of this article .

The output transistor, 2N2222a is rated at 40V 0.8A, the 2N3904 is rated at 40V 0.2A both of which will probably suit most solid state applications. Those who want to use it for grid block keying will have to design their own interface!

Conclusions

Hopefully this article will remove the obstacle for those building keyers for portable use and will allow them to have a choice of 4 messages to use

Fig 1. RC Controlled Circuit

Fig 2. Component Layout
 

Fig 3. Commercial PCB Layout, The components mount on the other side

Table 1. Component Listing


Component Value
C1 100pF Ceramic
C2 0.01uF Ceramic
C3 0.1uF 25V Tantalum (Can be SMT)
C4 1uF 25V Tantalum (Can be SMT)
IC1 PIC16F630
IC2 78L05
R1 47k
R2 2200
R3 820
TR1 2N2222A,2N3904 or equivalent
VR1 20k minature preset