Manual and Description of DL4YHF's QRP-PIC-Keyer

Revision history:
07/1999: first release of keyer hardware, firmware and manuals.
03/2000: implemented "beacon"-mode (useful also for ARDF transmitters)
03/2013: the rarely used 'QSK'-output can be used as PTT in "Semi-BK"-mode now

Speed Control

The CW speed is controlled by a poti, which is also active during "replay". The speed range is about 20...300 letters per minute.


There are two buttons that control recording and replay of messages.

The button "Message 1" controls a message of about 63 characters that is stored in the PIC's internal EEPROM. This message will not get lost even if you disconnect the battery.

The button "Message 2" controls a message of about 55 characters that is stored in the PIC's internal RAM. This message will get lost if the battery is disconnected (but we never disconnect the battery as there is no need for a power switch).

If both buttons are pressed simultaneously, the keyer switches to "command mode" (explained below).

Playing a stored message

A short press of a "Message"-Button starts playing the corresponding message. If a message is "partitioned" (see below), use multiple short "clicks" of a button to select the part of the message you want to play.

Recording a message

To record a new message you have to press the corresponding button for about 0.5 seconds (until the keyer signals "M" with the LED, which means "Message record").

To stop recording a message you touch the message button for a second time. The keyer will signal "S" like "Stored" with the LED.

If the keyer runs out of memory during recording, it signals "F" (like "Full") and stops recording automatically.

This QRP-Keyer also measures the gaps between WORDS (unlike NorCals famous keyer by N6KR). The "Pause-code" together with the length of the pause is recorded as an individual character in memory and therefore occupies one memory location. The Pause-Length is recorded as a "multiple" of a dot-length, so if you replay a message with a higher speed than when recording it, also "long" pauses will become shorter.

Partitioning of a Message

Instead of one "long" message you may also record multiple "shorter" messages in a single message memory. I call this a "partitioned" message.

To separate all sub-messages in a memory you have to insert a special character called "End Of Message" (EOM). All Messages are recorded as one "long" Message, with an EOM character at the end of each sub-message.

The EOM character is entered into the memory by running together the letters E+O+M (".-----").

Playing a part of a "partitioned" Message

To recall (play) the second part of a recorded message you have to press the "Message"-Button as two times (with ony a short delay between to button-"clicks").

To play the 3rd sub-message just press the button three times and so on.

If you press a message button quickly more often than there are sub-messages, the keyer does not replay anything at all.

When playing a recorded message, the keyer will stop when it reaches an EOM character in the message memory... for one exception: In the "memory-LIST-mode" all codes that are stored in a memory are played "without conversion".

The "memory-list-mode" you will also hear the recorded EOM characters. More on the "list mode" will follow below.

Side- and Signal-tone

You may connect a small (passive) piezo speaker to pin 2 of the processor (this pin is called "RA3" or "Audio Out").
The piezo speaker will be able to generate a SIDE-TONE for CW transmission and a SIGNAL-TONE to indicate special conditions (or "feedback") that may be important for some operators.
During "normal" telegraph operation the sidetone may be useful if you want to build the keyer into your homemade QRP transceiver.
In "command mode", for "Warnings" and other "Signals" the keyer sometimes generates the lower-piched SIGNAL TONE.
It simplifies the operation of the keyer, especially if you often use the "special functions" of the keyer. Usually the signal tone will produce single morse codes at a FIXED speed (not depending on the speed poti, about 60..80 letters per minute).
If you want to use the sidetone, you may find a suitable piezo speaker in an old electronic "happy birthday"-card.
If you don't want to use a piezo, because you have a transceiver with built-in sidetone, you may use "optical" signals from a signal-LED. Connect a red low-current LED from Pin 8 ("RB2" or "Signal LED") via resistor to ground. This LED will only be driven by the keyer, when a SIGNAL TONE is generated. Therefore the LED will **NOT** be on during "normal" CW transmission.

Switching output for PTT / "QSK" / "Semi-BK"

This digital switching output from the PIC is rarely used, because in most cases, only the 'Morse' keying output will be connectd to the transceiver; the RX/TX switch timing is entirely controlled by the transceiver (but not by the keyer, left aside the venerable IC-202, and possibly some homebrew equipment).
The author (DL4YHF) implemented this feature in March 2013 to (ab-)use an FM handheld transceiver to remotely control an HF transceiver, using the FM handheld's DTMF keyboard for control, and the PIC keyer's sidetone- and semi-BK-outputs to 'uplink' his own Morse code to the remotely controlled rig. For that purpose, an extraordinarily long transmit delay (TD) was required.

Keyer signal timing for 'Semi-BK'-operation
The adjustable transmit delay time (TD) to 'key up' the transmitter at the begin of an over is only supported by the Semi-BK variant of the PIC keyer firmware (keyer628_semi_bk.hex). By default, this time is almost zero. The delay can be modified in the keyer's Command Mode (see below), using commands 'X0' to 'X9' (0 to 9 times 20 milliseconds). Once the transmitter has been keyed up' in Semi-BK mode, it remains in the transmitting state until no more dits and dahs have been sent for approximately one second. This time can be adjusted by the "Y" command.
In the 'QSK' (or 'Full-BK') variant, the keyer's transmitter control output is only active during a single character, so the transceiver switches back to receive 'between characters'.

Command Mode

Special commands to the keyer are entered in "command mode" with the paddles. To enter command-mode, press both buttons simultaneously. The keyer will answer with the signal-tone "C" (like "Command mode").
As long as the command-mode is active, the keyer tries to interpret all characters that you enter with your paddles as "command". Usually a command consists of a single morse letter. The keyer answers to every recognized command with the signal-tone "R" ("Roger"), every command that could not be recognized will be answered with the signal-tone "?" (question mark, "..--.." ).
You may exit from command mode either by a second simultaneous touch of both message-buttons or by entering the "D"-command ("Done") with the paddle(s).
The following command are implemented at the time of this writing:

Command "A": Turn DOT/DASH-memory OFF. With the DOT/DASH-memory turned off the keyer behaves like this: If you release the padddles while a dot or dash is being sent, the dot or dash will be completed, and nothing else is sent.
In other words: If you touch the DOT, while a dash is being sent, and release the DOT before the transmission of the dash is over, there will *NO* dot be sent after the dash (in contrast to mode "B").
I guess this is sometimes called "Iambic Mode A".

Command "B": Turn DOT/DASH-memory ON ("BETTER" Mode) This is my "preferred" keying mode, where the keyer stores the "opposite" element during transmitting of one element. For example, if you first touch the DASH and -while the dash is being sent(!)- touch the DOT, the keyer will send the DOT after the DASH is finished (no matter if you release the DOT before the end of the DASH-transmission). Once upon a time, this mode was possibly called "Iambic B".

Command "C": "beaCon"-Mode (endless replay without time-limit)
The "beacon"-mode (implemented in early march 2000) is very simple to the "endless loop"-mode, but the "beacon" mode does not have the 255-repeats-limit. Only beacons (or ARDF-transmitters) may use the becon mode. To transmit repeated (almost "endless") CQ loops you should prefer the "loop"-mode, see "E"-command.

Command "D": "Done" Exits from "Command"-mode and returns to "normal" keyer operation.

Command "E": "Endless playing" Switches the memory-replay-modus to "(almost) endless loop".
This allows playing a stored message (almost) endless, while the operator sits in the background drinking a cold beer. After 255 repeats the keyer terminates the "endless" replay loop (which prevents real "endless" transmissions, if the operator has to go "somewhere" and forgets to terminate transmission).
Switching to "endless loop mode" does not start playing a message, you still have to start playing by pressing the message button.
To terminate the "endless loop mode", use the "F" command.
To terminate playing a message ("endless" or "normal") just touch the paddle.
Tip: Append a long "pause" at the end of your cq-call-message, before you stop recording the cq-call.
This will give you a delay for "listening".
If you hear someone answering, touch the paddle and the "cq"-loop will stop.
The "beacon"-mode (implemented in early march 2000) is similar to the "endless loop"-mode, but the "beacon" mode does not have the 255-repeats-limit. See descrption of the "C"-Command.

Command "F": "Fix it". Terminates "E" ("almost Endless playing") or "B" ("Beacon mode"), and reverts to the normal behaviour of the message-replay-buttons:
Button pressed once -> message text played once, then stops.

Command "L": "List-mode". Can be used to check the content of a complete message buffer with "special functions".
If you play a recorded message in "list mode", there will be no "conversion" of special codes like EOM, NNN and ANN.
Return from "list mode" to "normal operation" with the "M"-command.

Command "M": "Macro-mode"
If this message-replay-mode is active, special characters like "EOM", "NNN", "ANN" are treated in a special way.
The characters "NNN" is "expanded" into three digits.
This mode is the default mode, it is "complementary" to the "List-mode" (see "L"-command).

Command "N": "set Nummer for contest-operation" See chapter "Contest Operation". This command is used to initialize the "serial contest-number" to any value between 000 and 999.
The keyer answers with the Signal-Tone "NR" to tell you that it expects the entry of a three-digit-number with the paddle(s).
After the "N"-command you have to enter three digits, after entry of the last digit the keyer signals "R".

Command "Q": "Quick digits" Switches the digit-output-mode to "quick digit mode".
In this mode the keyer will generate digits as follows:

Note: The "quick digit modes" does not apply to normal recorded numbers. At the time of this writing this only applies to the expansion of the macro "NNN".
You may always ENTER numbers using "normal" digits or "quick" digits, no matter if the quick digit mode is active or not. The keyer always "understands" both formats if it waits for a numeric input.

Command "S": "Standard digits" or "Slow digits" Switches the digit-output-mode back to the "standard"-mode.
In this mode all digits "generated" by the keyer are given as morse-codes with 5 elements.

Command "T": "Tune" Turns the transmitter continuously ON
(strictly speaking: for a maximum time of about 30 seconds).
To stop "tuning" just touch a paddle or any message-button.
If you stop "tuning" manually, the keyer will also exit from command mode.
If the keyer stops "tuning" after the 30-second-timeout, it will **NOT** exit from command mode. You may then start a new 30-second-tune-interval with another "T".

Command "X": Set TX-Delay (only for the 'Semi-BK' variant of the firmware).
See chapter Semi-BK . The digit after the 'X' specifies the delay between activating the transmitter's PTT (via output from keyer), and the transmission of the very first dash or dot in the 'transmit over':
X0 = no delay to key up the transmitter
X1 = 20 milliseconds
X2 = 40 milliseconds
X3 = 60 milliseconds
X4 = 80 milliseconds
X5 = 100 milliseconds
X6 = 120 milliseconds
X7 = 140 milliseconds
X8 = 160 milliseconds
X9 = 180 milliseconds

Command "Y": Set RX-Delay (only for the 'Semi-BK' variant of the firmware).
See chapter Semi-BK . The digit after the 'Y' specifies the time the keyer waits after the last morse character, before switching back to RECEIVE (i.e. before turning off the keyer's PTT-output):
Y0 = immediately switch back from 'transmit' to 'receive' after the end of a character
Y1 = 0.2 seconds
Y2 = 0.4 seconds
Y3 = 0.6 seconds
Y4 = 0.8 seconds
Y5 = 1 second
Y6 = 1.2 seconds
Y7 = 1.4 seconds
Y8 = 1.6 seconds
Y9 = 1.8 seconds


In combination with the two message-memories you may use the keyer as a real "contest keyer" with automatic contest number generation. All you need is a little "smart programming" of both message memories in combination with two "macros" that you have to record along with your contest messages.

All you have to do during the contest is repeat the other station's callsign and recall the proper message from the memory...
(If you don't like contests, you may use this "counter feature" for something else or ignore this chapter)

These "macros" are used to generate numbers and to increment a counter:

Macro "NNN": ("Number Number Number") Is entered into a memory as "-.-.-." .
When playing a message, this macro will be "expanded" into a 3-digit contest number.
This function can be called as often as wanted, it does **NOT** affect the contest counter !


Macro "ANN": ("Advance Number") Is entered into a memory as ".--.-." .
Another way to remember this macro is:
".--.-." = "PN" = "Plus Number" or
".--.-." = "AC" = "Add Counter"

Incremets the "current contest-number" by one.
It does **NOT** generate a "transmitted" character when played from a message memory.
You will only "see" this macro in a message memory when you activate the "list-mode" ("L" command, see chapter "command mode").

As you can see, the macros "NNN" and "ANN" have to be combined in a contest.
The message that you use to give a contest report, will use the "NNN" macro (maybe repeatedly). An example for a very simple contest report: "599/<NNN> 599/<NNN> BK <EOM>"

When playing this message, the keyer replaces the <NNN> by the current contest number. It will transmit for example: 599/123 599/123 BK

After a contest-"QSO" is complete, you will play a different message from another message-memory (or at least from another partition of a message-memory) which contains the macro "ANN".

  It's ok to use a short message like this: "73 gl <ANN> qrz ?"
When playing this message the keyer only transmits this: 73 GL QRZ ?
because the macro <ANN> only increments the contest number but it does not "transmit" a character.
Next time you play the contest report from the first example, the keyer will transmit "599/124 599/124 BK".

Technical Data

Processor: PIC16F628-04/p - data sheet and development system available at WWW.MICROCHIP.COM

- in the keyer driven with internal RC-Oscillator, clock frequency about 37 kHz (for PIC16F628)

- 2048 * 14 Bit EEPROM programm memory, serial programmable with a simple programming tool connected to your PC.

- 224 Byte of internal RAM

- 128 Byte of internal EEPROM

- one 5-Bit-Port (Port A) and one 8-Bit-Port (Port B), Port B has switchable internal pull-up resistors

- power-saving sleep-modes with "wake-up" on change of any input signal on Port B

- 8-Bit Timer/Counter (not used in the keyer!)

Power consumption (supply voltage = 2.4 V): - operational, no sidetone active: 60 microamperes

- operational, with piezo-sidetone beeping: 200 microamperes

- during standby: less than 1 microampere (typical)

The keyer enters standby-mode automatically after some seconds of "no activity".


For PIC16F628, use the file "keyer628.hex" (without "Semi-BK") or "keyer627_semi_bk.hex" (with Semi-BK). They are available at the author's website:, where you can also download the latest version of this manual.

Commercial use requires the author's permission.
The source code is also available on the author's homepage. All rights reserved.

Circuit diagram and PCB

See DL4YHF's website at QSL.NET !

Kits ? Not yet..

but "Kit-Assemblers" who want to spread this keyer as a kit are welcome, as long as they will offer kits for "ham spirit"-prices.

Exclusion of warranty

Sorry, I hate this legal stuff, but here it comes:

The author provides absolutely no warranty, to the extent permitted by applicable state law.

The author and/or other parties provide this hard/software "AS IS" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
The entire risk as to the quality and performance of the hard/software is with you.
In no event unless required by applicable law will the author and/or any other party who may modify and/or redistribute this hard/software be liable to you for damages, including any lost profits, lost monies, or other special, incidental or consequential damages arising out of the use or inability to use this package, or for any claim by any other party.