The Museum of HP Calculators

HP Forum Archive 02

[ Return to Index | Top of Index ]

Message #1 Posted by Tal on 27 Apr 2000, 3:53 a.m.

Hello HP-48 users,

I wonder if it is possible to output logic "1" for 2 seconds via RS232 port for activate electrical device.

Thank you in advance. Best regards, Tal email:

Message #2 Posted by Reinhard Hawel on 27 Apr 2000, 3:47 p.m.,
in response to message #1 by Tal

You might get happier with building a small single-chip microprocessor solution, which decodes several commands.

In addition you wouldn't have to worry about dealing with low level 48 internals and the external device would be controllable with any serial input.

I could help you with building such a device (seems like an easy task).

AFAIK the 48s UART is made in Hardware and I don't see much possibilities keeping the voltage at a certain state for 2 seconds.

Message #3 Posted by Joe Panico on 27 Apr 2000, 3:58 p.m.,
in response to message #2 by Reinhard Hawel


Hey! Don't post an educated reply while I'm typing my semi-educated reply.


Message #4 Posted by Reinhard Hawel on 28 Apr 2000, 5:30 a.m.,
in response to message #3 by Joe Panico

I don't think your reply is semi-educated. In fact I was too lazy pointing the facts out like you did (It was late in the evening and I had to sleep somehow :-).

Tal, what exactly do you want to do with the device ?

The concept seems intersting and I thought abt. building such a device over years. (My planning was more complicated, with analogue and digital input circuitry). The main problem seems to be the protection of the interface (CMOS protection diodes are rather easy to kill with, say 220 VAC).

When you only want to toggle a single line, a single-chip processor alone could be the solution (together with a resonator and some circuitry to separate the calculator and the device electrically).

I'm sure you wouldn't want to fry the HP48 in case of failure, so you should seperate the circuits.

Message #5 Posted by Daniel Diggelmann on 28 Apr 2000, 7:01 a.m.,
in response to message #4 by Reinhard Hawel

Hello Reinhard,

As you are living in germany I'd like to mention that CONRAD Electronics sell a cheap microcontroller system. The system is called C-Control and exists in two sizes. I'm using the smaller M-Unit (48x41mm) which consists of a MOTOROLA 68HC05 and 8kBytes EEPROM (price DM 50.-). The board provides 16 digital I/Os, 8 analog inputs and 2 D/A outputs (PWM). Power consumption is very low at 6mA. Additionally you need a RS232 board and the BASIC compiler (another DM 50.-). I'm using the system for a Datalogger in my radiocontrolled model. The Data can be readout with my HP48/49. With this system it's really easy to implement any measurement and control project with your HP48/49.

Cheers Daniel

Message #6 Posted by Joe Panico on 27 Apr 2000, 3:56 p.m.,
in response to message #1 by Tal


My guess is that you can't. I figure myself as a man of "mini-talents" so my reply is a (educated?) guess.

The 232 is designed to communicate, not supply operating voltage and current to electic devices. (An earlier post said "... open a flap door") So, the voltage and current used by the interface is too low to operate other devices. Plus, how much can 3 AAA's supply? A data collection/control device was available for the old HP71's which probably would accomplish what you want.

An age old reason to not do this is to isolate the device under control from the source of the control instructions. In other words, if a direct connection is made and the electric device shorts, so does the 232.

You should look for a small, lab-type device designed for the 48. I've seen the TI unit for the TI-80's which look like what you want, but for a TI.

Good luck,


PS: How'd I get so smart? Six years of high school! Most people only get four.

Message #7 Posted by Steve on 28 Apr 2000, 9:49 a.m.,
in response to message #1 by Tal

Back in the days of steam radio, it used to be done this way...

If the UART understands how to send a "break", then you can get 200ms of the logic level you're after. Now, the trick of getting 2secs of it is to make it send another break while the first is still happening.

I have no ides if the UART in the HP48 can send a break, or if the HP48 can force it to send one. If it can, I have no idea if it can send another before the first one completes.

Oh, and if you're interfacing to something that has "bitey" voltages, please use an optocoupler.

Oh, another way.
Message #8 Posted by Steve (again) on 28 Apr 2000, 10:03 a.m.,
in response to message #7 by Steve

An easy way may be to use 1/6 of a 40106 (from memory - is that a hex schmitt trigger?) wired up as a pulse extender. This will allow you to send any character out of the RS232 port, and have it converted into a single pulse. This pulse can be used to clock a flip-flop that is wired to change state on each clock pulse. The remaining inverters can be used to buffer the input signal, and to drive the diode in an optocoupler from the output.

Send one character to turn it on, another to turn it off (after the requisite delay).

Alternatively, and even easier if you don't want control of the ON time is to give the pulse extender a time factor of 2s, so it turns on immediatly the start bit of the character comes along, and turns off 2s after the stop bit.

requires 1/6 hex schmitt trigger, 1 diode, 1 cap, 1 resistor.

C and R chosen so that 1/2RC = 2 (where R in ohms, C in Farads.

e.g. 10uF, 390K.

Connect diode anode to TD, cathode to input of 1/6 40106. Cathode also to one end of R (other end to 0v) C in parallel with R.

Re: Output from HP48
Message #9 Posted by Andrés C. Rodríguez on 29 Apr 2000, 11:58 a.m.,
in response to message #1 by Tal

If you would like to send commands to a simple (CMOS logic, for instance) device, there are some options apart from the serial port.

1) Piezo buzzer. The tone commands of the -48 series allow the user to define frequency and duration, so you could send a rather large variety of tones. Such tones could be seen as pulse trains, you define the frequency and the number of pulses come from the duration multiplied by the frequency

In example, a 400 Hz tone, 0.5 seconds will output 200 pulses.

Such pulses could be coupled to external devices via a small condenser microphone (I do not like it because the many distortion or noise factors going around). It would be better to connect the piezo buzzzer leads to the outside. I have done this successfully from an HP41 around 1980 (see my article "Calculator Memories from Argentina" in this Museum). Alas, the -41 was "openable", and the -48 is not (or is it?)

Steve suggestion on using an optocoupler is a very good and recommnended idea on almost every case.

2) Infrared Port: You may just output some info via the IR port (ie: printing commands), pick up the IR signal with a phototransistor near the IR LED, and go from there on. It would be difficult to decode the information sent, but it is very simple to detect "some" IR activity on this port.

As long as you can do with a simple code (ie: one signal, ON; two signals, OFF), you may get what you need with some simple CMOS logic, and one or two simple timers. And you will not have to open the calculator or to risk electrical connections that may affect it.

You may think of it as a "rather sohisticated optocoupler".

Output through IR-port is safer
Message #10 Posted by menno on 1 May 2000, 2:27 a.m.,
in response to message #1 by Tal

I thought Neat Instruments (I will try to find it back) allready had a device which communicated through the IR-port. It was not a difficult thing. I forgot the name of the guy who made it.


Re: Output through IR-port is safer
Message #11 Posted by Jos on 3 May 2000, 4:05 a.m.,
in response to message #10 by menno

There is a company selling IR boxes for measurement, simulation and logic analysis. Site info at:

Site is only in German though, some main characteristics: cost: 99DM (approx. $46) 4 analog inputs, 0..5 V, 8 Bit 8 digital inputs, 0..5 V 4 digital outputs, Open Drain 2 PWM Ausgänge, Open Drain

They also have other interesting items for sale (I did not buy anything from them yet, have no idea of service etc., I am not affiliated in any way to this company)

[ Return to Index | Top of Index ]

Go back to the main exhibit hall