[Elecraft] Interfacing an HP48 calculator to a K2
Jeff Burns
[email protected]
Wed Jul 2 10:24:01 2003
Why?
At past Field Days I have found it difficult to explain the use of the K2's
built-in CW memory features to the operators. An external box with buttons
to activate the memories seemed like it should be easier to use. An HP48
calculator has lots of buttons and a serial port. With a little programming
and a cable it should be possible to use the calculator as a memory key.
Physical Interface
The HP48 serial port uses a special 4-pin connector. I have the standard HP
cable to interface the HP48 to a computer. The computer end of the cable has
a 9-pin female connector. To connect to the K2 a male connector is needed.
The RX and TX lines also need to be crossed. I did not want to modify my
calculator cable so I made an adapter to connect it to the K2. I used two
9-pin male connectors and a short piece of wire. Pins 1 and 5 are wired
straight through. Pins 2 and 3 cross.
Do not use commercial serial cables or adapters. I tried many different
combinations of adaptors and found that they all connect the extra pins in
an unacceptable manner. Some combinations will result in damage to the K2!
Yes, I know from experience, and I thought I had checked out the cable
before connecting it. Make the adapter yourself.
Program
The HP48 command XMIT sends a string from the stack to the serial port.
I wrote a program that takes a string from the stack and adds "KT" the
beginning, and a ";" to the end. It then uses XMIT to send the command out
the serial port to the K2. Finally, the port is closed to save battery
power. I named this program "KT".
Other programs just put a string on the stack and call KT. All the programs
are in one directory. The six buttons across the top row of the calculator
can directly access the first six programs in the directory.
To send a message just touch the appropriate button on the calculator and CW
is played by the K2.
A program listing is at the end of this message.
On the Air
This setup was used at Field Day this past weekend. It worked. No technical
problems. Ergonomically it was not ideal. The calculator has so many buttons
that you have to be careful to find the correct one. Also, the indicator
on the LCD display above each button could not be seen with the calculator
sitting flat on the table. Operators were constantly picking up the
calculator to read the legend text. There is also no easy way to stop the CW
message. I have not found a way to send the "@" from the HP48 to stop CW,
and the K2 does not stop sending if the paddles are touched while it is
sending messages received on the serial interface.
Improvements
All the problems I noted can probably be fixed fairly easily. Someone
experience with System RPL programming could develop a complete remote
control program. I will probably not develop this concept any further.
Code Listing
DIR
CQ
<< "CQ FD " KY
CALL
>>
CALL
<< "W9GO " KY
>>
EXC
<< "4A IN " KY
>>
TU
<< "TU " KY
>>
CALL?
<< "CALL ?" KY
>>
SEC?
<< "SEC ?" KY
>>
KY
<< S
<< "KY " S +
";" + XMIT DROP
CLOSEIO
>>
>>
SETUP
<< PATH { 4800 0
0 0 3 3 } HOME
'IOPAR' STO EVAL
>>
END