|Driving a relay with the HP-71B|
Message #1 Posted by Klaus on 30 Nov 2008, 7:54 a.m.
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:
ENDBIN EQU #0764B
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.