I finally took some time to work on my project to use the HP-71B to control a relay. The idea is to use the wake-up-on-timer feature of the HP-71B to control some devices. To maximize battery life, I chose a bistable relay with two coils, so only when switching the state of the relay, "power" (I don't think this is the correct term, but you will understand what I mean) is needed.
Each coil of the relay is connected to V+ (via a small resistor), and via a darlington transistor (BC-517) to GND. The HP-71B drives the darlington transistors with its unused output-lines "OR9" and "OR8". Between the HP-71B and the base of the transistor is a 100k ohm resistor and a diode.
The code to drive one output-line is the following:
BIN 'OR9'
CHAIN -1
ENDBIN EQU #0764B
LCHEX 01F
OUT=C
GOVLNG ENDBIN
END
I assembled this program, and now the HP-71B is able to switch the relay by executing "RUN OR9" and "RUN OR8". But since this is my first program for the HP-71B, I would like to hear your opinion. I have some doubts about "cleaning up" after the program. Can I rely on the HP-71B OS to set the output lines OR9 and OR8 to a low-level after the asm-program is run*? Has anyone done a similar project? I used the projects described in "control the world with HP-IL" as an orientation.
Have a nice weekend! Klaus
* I could do the cleanup myself, but the relay needs 6msec to switch, so I don't want to program a loop that waits. And the code-as-is works.