The Museum of HP Calculators

HP Forum Archive 08

[ Return to Index | Top of Index ]

HP-42S
Message #1 Posted by Jeff Glass on 7 Aug 2002, 9:24 a.m.

Hello:

Are ther any devices out there that use the IR port on the 42S to download programs from the 42 to an IBM PC?

Jeff

      
Re: HP-42S
Message #2 Posted by warren on 7 Aug 2002, 12:45 p.m.,
in response to message #1 by Jeff Glass

The INPRT program (available here:http://www.hpcalc.org/details.php?id=2296) appears to let you transfer to an HP48G/+/X, which can then transfer to a PC. A method to dump the 42S ROM image to a 48 using this program is described here:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=266

So if you have a 48, this might work.

            
Re: HP-42S
Message #3 Posted by Randy Sloyer on 7 Aug 2002, 5:30 p.m.,
in response to message #2 by warren

While the article mentioned is a starting point, it really doesn't provide much detail, especially if you are not a 48 expert (like me). It's easy once you are set up. You will need:

  1. A 48 of any flavor, any S or G model.
  2. The INPRT program
  3. The HPGCOMM program to transfer the INPRT program to the 48 and the 42S programs back to the PC
  4. A PC to 48 serial cable
  5. A utility program to translate the 42S program to the PC character set
I wrote the #5 a while ago as a dos command line program. I could dig it out and email to you if you wanted to tackle this project. I found it easy once I got past the unknowns on the 48 side. It was a handy way to archive my programs.
                  
Re: HP-42S
Message #4 Posted by John K. (US) on 7 Aug 2002, 9:06 p.m.,
in response to message #3 by Randy Sloyer

> I wrote the #5 a while ago as a dos command line program.

If you still have the source code, I'd be willing to look at doing a *nix port of it. Please e-mail me if you're interested/willing in letting me attempt the project.

                        
Re: HP-42S
Message #5 Posted by Randy Sloyer on 8 Aug 2002, 5:38 p.m.,
in response to message #4 by John K. (US)

Sorry, I should not have called it a "dos" program as it is a rather specific windows cmd line program - I used a commercial awk program called "TAWK" which is compiled and has non-standard awk extensions. It was rather trivial in content - it only translated character positions. But - I also used Unicode Open Fonts to get all symbols used by the 42s. I doubt that it would work under anything than WinXp or perhaps 2000. The compiled exe is 100k+ due to the run-time baggage.

What would you do in *nix to to get a matching font? I was thinking of making a windows bit-mapped font to match the 42S but never got around to it. This would at least save the unicode dependencies.

                              
Re: HP-42S
Message #6 Posted by John K. (US) on 9 Aug 2002, 2:17 a.m.,
in response to message #5 by Randy Sloyer

> What would you do in *nix to to get a matching font?

Well, without seeing the code, I'll have to guess at a lot of it, but...

It might be possible to come up with a version using standard awk/gawk syntax that will be functionally identical. If not, then it might still be possible to use something else (say, Perl) to perform the manipulations.

The Unicode problem is a little more difficult for me to WAG. I'm not entirely sure what the state of Unicode support is under Linux, but most of the commercial versions of Unix have at least rudimentary support, though I'd have to look at the individual tools to see if they'll do what's needed.

The situation is quite a bit simpler on Mac OS X, since the sytem uses Unicode pretty much for everything, and it comes with decent support in the command line tools -- including both Tcl and Perl.

In fact, if the port is successful, it would be almost trivial to make a bi-directional translation tool. Not that it would be of much utility, given the 42's lack of input options, but the geekion flux density of such a thing would be significant. Who knows? If someone ever comes up with an robotic key-stroke entry robot for the 42S, the tool could probably be modified to generate instructions for the robot. :^)

                                    
HP-42S input
Message #7 Posted by Andrés C. Rodríguez (Argentina) on 9 Aug 2002, 8:09 a.m.,
in response to message #6 by John K. (US)

About a year ago Tony Duell, Paul Brogger and I (and others) discussed an electronic interface which could be used to input information to an HP42S. Tony actually build a working prototype, based on CMOS Switches (CD4052) emulating keypresses, and driven by optocoupled signals from a PC paralell port. Look at the archived posts here at the MoHPC forums.

                                    
Re: HP-42S
Message #8 Posted by Randy Sloyer on 9 Aug 2002, 10:47 a.m.,
in response to message #6 by John K. (US)

If you skip the unicode handling aspect of the program, it comes down to two lines lines of awk code to translate a 42S program to printable text.

BEGIN { RS = "\04" }

NR > 3 { print $0 }

For the non-awk'ers out there, the first line sets line terminator to the 42S convention of char(4) and the second line prints every line of text after skiping the first 3 lines which are baggage that comes in from the 48 port. As I said, quick and dirty.

You can exend this to translate to whatever character set you desired by using awk's associative arrays to hold the character mapping.

                                          
Re: HP-42S
Message #9 Posted by John K. (US) on 9 Aug 2002, 9:56 p.m.,
in response to message #8 by Randy Sloyer

Randy,

Could you do me a favor and e-mail me a copy of a sample dump from a 48? (In fact, it might be a good idea for us to continue this conversation out of band.) It would also help if you could include the associated output from your program, as well as the character mappings you're using. Of course, a copy of the tawk program would also be useful, if for no other reason than to look at your methodology. Thanks!

On the face of it, it doesn't look like it'll will be too difficult to hack something together in standard awk to do the job.

      
Re: HP-42S
Message #10 Posted by Andrés C. Rodríguez (Argentina) on 7 Aug 2002, 5:50 p.m.,
in response to message #1 by Jeff Glass

Look for old postings in the Archives Forum. or articles by Steve (Australia) in which he describes how to decode the datastream from the HP42 by means of the PC soundcard audio input. Is very enlightening and good reading. Articles and Archived Forum can be accessed frmo the MoHPC Forum menu.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall