[Elecraft] K2 control on a HP48 calculator

Jeff Burns [email protected]
Fri Dec 12 21:27:01 2003


I have made some updates to my K2 control program that runs on a HP48
calculator. I used it in the ARRL 160m contest with good success. Some time
ago I posted my original version of this program and a description of the
connecting cable. This should still be in the archive.

The new features include:

CW strings can now have QSO serial numbers.

Both the Crystal and Audio filters can be set at the same time. I assigned
four buttons on the calculator to different bandwidths. This is much faster
than multiple tap and hold sequences on the radio.

A function that puts the time and date on the stack is useful. By assigning
it to a key I can quickly save the start time of a QSO.

Exchange patterns are stored in directories. This makes it easy to have
different settings of various contest and casual QSO's.

The program listing is attached below. By saving it in a file it should be
directly loadable into the calculator.

Jeff Burns
AD9T

%%HP: T(3)A(D)F(.);
DIR
  CUST
    DIR
      NSS
        DIR
          EXC
            \<< NR
PREC CALL CK SEC
            \>>
          NR
            \<< "NR "
KY SNUM\|^ KY
            \>>
          PREC
            \<< " Q"
KY
            \>>
          CK
            \<< "99 "
KY
            \>>
          SEC
            \<< "IN "
KY
            \>>
          CALL
            \<<
"AD9T " KY
            \>>
          PREC?
            \<<
"PREC ?" KY
            \>>
          NR?
            \<<
"NR ?" KY
            \>>
          CALL?
            \<<
"CALL ?" KY
            \>>
          CK?
            \<<
"CK ?" KY
            \>>
          SEC?
            \<<
"SEC ?" KY
            \>>
          TU
            \<< "TU "
KY
            \>>
          CQ
            \<<
"CQ SS " KY CALL
"K" KY
            \>>
          SNUM 5
        END
      FD
        DIR
          CQ
            \<<
"CQ TEST " KY CALL
            \>>
          CALL
            \<<
"AD9T " KY
            \>>
          EXC
            \<<
"5NN IN " KY
            \>>
          TU
            \<< "TU "
KY
            \>>
          CALL?
            \<<
"CALL ?" KY
            \>>
          SEC?
            \<<
"ZONE ?" KY
            \>>
        END
    END
  SETUP
    \<< PATH { 4800 0
0 0 3 3 } HOME
'IOPAR' STO EVAL 2
K2
    \>>
  T&D
    \<< "D: " DATE
\->STR 1 5 SUB 3 ","
REPL + " T: " +
TIME \->STR 1 6 SUB +
    \>>
  DECSN
    \<< 'SNUM' DECR
"Serial Num" \->TAG
    \>>
  INCSN
    \<< 'SNUM' INCR
"Serial Num" \->TAG
    \>>
  SNUM\|^
    \<< SNUM N\->SNS
    \>>
  N\->SNS
    \<< \-> N
      \<<
        IF N 100 \>=
        THEN ""
        ELSE
          IF N 10 <
          THEN "00"
          ELSE "0"
          END
        END N +
\->STR
      \>>
    \>>
  FIL1
    \<< 1 1 FW
SETAFIL
    \>>
  FIL2
    \<< 2 2 FW
SETAFIL
    \>>
  FIL3
    \<< 3 3 FW
SETAFIL
    \>>
  FIL4
    \<< 4 4 FW
SETAFIL
    \>>
  SETAFIL
    \<< \-> F
      \<< GETFW SWAP
DROP OBJ\-> F SWAP -
\-> S
        \<<
          IF S 0 <
          THEN 4 S
+
          ELSE S
          END \-> S
          \<< S
            WHILE
DUP 0 >
            REPEAT
AFIL 1 -
            END
DROP
          \>>
        \>>
      \>>
    \>>
  K2GET
    \<< SRECV DROP
    \>>
  AFIL
    \<< "SW29;" XMIT
DROP CLOSEIO
    \>>
  GETFW
    \<< "FW;" XMIT
DROP 9 K2GET
CLOSEIO DUP 7 7 SUB
SWAP 8 8 SUB
    \>>
  K2
    \<< \-> F
      \<< "K2" F +
";" + XMIT DROP
CLOSEIO
      \>>
    \>>
  FW
    \<< \-> F
      \<< "FW0000" F
+ ";" + XMIT DROP
CLOSEIO
      \>>
    \>>
  KY
    \<< \-> S
      \<< "KY " S +
";" + XMIT DROP
CLOSEIO
      \>>
    \>>
END