The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

IR Printer Compatibility
Message #1 Posted by Les Wright on 18 Dec 2006, 9:35 p.m.

Does the 82240B IR printer work with the 42S?

The 42S manual seems to refer only to the 82240A.

Many thanks,

Les

      
Re: IR Printer Compatibility
Message #2 Posted by Thor Lansen on 18 Dec 2006, 9:50 p.m.,
in response to message #1 by Les Wright

Yes it does, I just did a self test of my HP 42S with the HP 82240B on (as instructed in the manual) and it works fine.

Regards, Thor

      
Re: IR Printer Compatibility
Message #3 Posted by Vieira, Luiz C. (Brazil) on 18 Dec 2006, 10:50 p.m.,
in response to message #1 by Les Wright

Hi, Les;

just to add that the HP82240B has two character sets that can be selected by scape sequences: ROMAN8 and ECMA94. The HP48 series allow such selection, but neither the HP42, the HP28 nor the HP41 with IR module allow such selection, and I'd guess it is due to the fact that the HP82240B was introduced after them. The default character set when turning the 82240B on is the one compatible with the 82240A, so any HP calculator with IR output can use it. IIRC, the HP48 series set the ECMA94 character set everytime it prints through the IR output. This can be overriden with the OLDPRT command.

Cheers.

Luiz (Brazil)

(forgive me if there is any wrong info; I have no manuals in hands right now and it is somehow late here... 01:43 AM)

Edited: 18 Dec 2006, 10:55 p.m.

      
Re: IR Printer Compatibility
Message #4 Posted by Karl Schneider on 18 Dec 2006, 11:40 p.m.,
in response to message #1 by Les Wright

Quote:
Does the 82240B IR printer work with the 42S?

I can confirm that the 82240B IR printer works with the 17B, 17BII, 27S, 28C, 41C* with IR module, 42S, and 48G. If I had the 18C, 19B, 19BII, 28S, or the other all-HP 48-series, I could confirm those, as well.

-- KS

      
Re: IR Printer Compatibility
Message #5 Posted by James M. Prange (Michigan) on 19 Dec 2006, 9:03 p.m.,
in response to message #1 by Les Wright

Since the default character set for the 82240B is the Roman 8 set, it works just fine for calculators that were designed to print to the 82240A.

The 82240A has only the HP Roman 8 character set, and the 82240B has both the Roman 8 and a modified ECMA 94 Latin no. 1 character set, which, I believe, is the same as the ISO 8859-1 character set.

The characters 128 through 159 aren't defined in ECMA 94 (they're reserved for control codes defined in ECMA 48), but the these printers and calculators use them for "graphic" (printable or displayable) characters, and a few other characters differ from the ECMA 94 definitions.

The escape sequence for switching the 82240B to ECMA 94 is <27><248>, and the escape sequence for switching it to Roman 8 is <27><249>; the 82240A ignores these two escape sequences.

Both printers ignore any control codes or escape sequences that aren't defined for them.

I assume that any calculator that prints to the 82240A/B is capable of sending the escape sequences for switching the 82240B to ECMA 94 or Roman 8, so with the 82240B, you could print characters that occur in one character set but not the other if you wanted to.

The defaults for the printers are single-width, no underline, Roman 8 character set, and print characters (instead of column graphics). The printer uses the defaults when first turned on, or after a reset command (<27><255>).

For the 48 series and the 49 series that have IR output (and presumably any other HP calculator that uses the ECMA 94 set) any printing command (except the CR command), with the calculator printing via IR, starts out by sending <27><248> to switch the 82240B to the ECMA 94 set, and doesn't switch it back to Roman 8 when finished printing. If you print to an 82240B from a 48/49 series, and then (without turning the 82240B off and back on) print to it from a calculator that uses the Roman 8 set, you'll find that the 82240B uses the wrong character set until you do something to switch it back to the Roman 8 set.

The 48/49 series OLDPRT command is intended for use with printing to an 82240A printer. This sets up the remapping string (for characters 128 up to 255) within the list stored in the reserved variable PRTPAR; with this remapping string present, for characters shared by the two sets (or reasonably intuitive substitutes), the Roman 8 character is substituted for the ECMA 94 character when printing via IR, so the 82240A works reasonably well with these models. But note that executing OLDPRT doesn't stop the calculator from sending <27><248> when it starts printing. If you execute OLDPRT and then print to the 82240B, you'll find that some wrong characters are printed. For better or worse, these calculators don't have any command for setting the remapping string back to an empty string, but you can purge PRTPAR, and the next printing command will create the default PRTPAR, or you can edit PRTPAR to substitute an empty string for the remapping string. Of course it's easy enough to write a program to replace the remapping string with an empty string, or with any remapping string that you prefer.

Since I use both the 82240A and the 82240B, I find the following NEWPRT program useful:

%%HP: F(.);                     @ Header for ASCII download.
@ NEWPRT program.
@ Results from the BYTES command:
@   48 series:
@     Checksum: # 852Fh
@     Bytes:        109
@   49 series:
@     Checksum: # 2429h
@     Bytes:       109.
@ Note that this program assumes that if the reserved global
@ variable 'PRTPAR' exists in the home directory, then it's
@ contents are valid. If a valid 'PRTPAR' exists, only it's
@ remapping string will be replaced. If 'PRTPAR' doesn't exist in
@ the home directory, then the default PRTPAR will be created.
\<<
  PATH                          @ Get current path.
  HOME                          @ 'PRTPAR' must be in home directory.
  IF
    'PRTPAR' VTYPE -1. ==       @ If 'PRTPAR' doesn't exist...
  THEN
     1.8 DELAY                  @ then cause it to be created.
  ELSE
    PRTPAR                      @ Place PRTPAR list on stack.
    2.
    ""
    PUT                         @ Replace the remapping string.
    'PRTPAR' STO                @ Store the new PRTPAR in HOME.
  END
  EVAL                          @ Return to original directory.
\>>
The printers also have a command (<27><253>) for printing double-width, and a command (<27><252>) for printing (the default) single-width. This can have a strange effect with (at least) the 48/49 series; if you send the command for printing double-width, the calculator starts formatting the printing for 12 (instead of 24) characters per line, and keeps doing this until it sends the command for switching back to single-width. If you send the command for double-width, and then, without sending the command for single-width, reset the printer (as by turning it off and back on), you'll find that the printer is printing single-width, but the calculator is still formatting the printing for 12 characters per line. To get the calculator back to formatting for 24 characters per line, send the escape sequence <27><252>, or of course to get the printer back to printing double-width, send the escape sequence <27><253> again.

Scans of the 82240A and 82240B owner's manuals are available on the current Museum CD-ROM set / DVD; see http://www.hpmuseum.org/cd/cddesc.htm. For more details on the printers, see the HP 82240B Infrared Printer Technical Interfacing Guide.

Regards,
James

            
Re: IR Printer Compatibility
Message #6 Posted by James M. Prange (Michigan) on 19 Dec 2006, 9:37 p.m.,
in response to message #5 by James M. Prange (Michigan)

PS:

If you use the 48/49 series to print to something other than the 82240A/B "Via wire" (including when printing via serial IR or IrDA by setting the calculator to "Transfer via IR"), then it's normally better to execute 0 DELAY, to eliminate the pauses to allow the printer to "catch up" and avoid an input buffer overflow during longer print jobs.

For printing to the 82240A/B with very fresh batteries or with the external power adapter connected, I find 1.1 DELAY to work okay. For printing with partially used batteries, the default 1.8 DELAY seems good. Basically, you want a very short pause before printing the next line during long print jobs. In case of a buffer overflow, a black block with a white slash through it is printed.

In the case of a character with an uncorrectable error, a black block is printed.

Regards,
James

      
Re: IR Printer Compatibility
Message #7 Posted by Les Wright on 19 Dec 2006, 9:57 p.m.,
in response to message #1 by Les Wright

Thanks, everyone, for so much help!

I have both a 42S and 48G and it seems the printer in question is readily available out there and not too expensive either so to use one effectively if I procure one I have much to learn.

Many thanks,

Les

            
Re: IR Printer Compatibility
Message #8 Posted by James M. Prange (Michigan) on 20 Dec 2006, 3:14 p.m.,
in response to message #7 by Les Wright

You're welcome Les.

Using the printer really doesn't take much learning though; read through the owner's manual for the printer, and the sections on printing in the calculator manuals. For the 48/49 models, read up on the reserved variable PRTPAR and flags -34, -37, and -38.

I highly recommend getting an AC adapter for it if you expect to use it at a location with AC power available (it doesn't have to be a genuine HP adapter, and the output can be AC or either polarity DC, with a fairly high range of voltages), and if you expect to run it from the battery very much, use NiMH cells (with a spare set easily available) instead of alkaline cells.

In your case, assuming that you get an 82240B, if you print to it with your 48G, then remember to switch it off and back on to restore the Roman 8 character set before printing to it from your 42S.

The reason for the DELAY command on the 48/49 series is that the calculator can send about 78 bytes per second, which is a lot faster than the printers can print text, and the printer can only receive; it can't send any information back to the calculator. The print speed varies with the battery condition when the AC adapter isn't used, but at best, is somewhat slower than one 24-character line per second. The printers have a 200 byte input buffer, so the 48/49 series sends the first 200 bytes in a continuous stream, but after that, introduce a user-definable delay before sending the next line to allow the printer to catch up. Similarly, the 28 series have a flag that can be changed to set the delay for using the printer with just the battery or with an external power source as well.

On the other hand, printing a full line of column graphics (in single-width mode) requires receiving 169 bytes, but the time to print the line is about the same as printing a line of text, so the printer may have to wait for more data before printing another line of column graphics.

Note that the delay is also used when printing "Via wire", but typically there's little danger of overflowing an input buffer in this situation, so it's usually best to set the delay to 0 for this. In particular, note that the "screen capture" functions of the "Connectivity Kits" use the PRLCD command to "print" the display via wire.

Note that there are alternative printers available from Martel Instruments, and it looks to me as if these should be able to print faster than the calculators can send via IR. Some of the Martel printers can receive via RS-232 as well, which should allow faster printing with the 48 series and 49G (and 50g, if you add a level-shifter for the serial port), and some are supposed to be able to use IrDA, which should be good with the 49g+/50g. Also note that the input buffer is much larger (6KB on the MCP8830). Of course with RS-232 or IrDA input available, that makes it more likely that the printer can be used with devices that you may own other than HP calculators. The martel printers have more fonts and print barcodes, and have a higher maximum resolution. The Martel models MCP8830 and MCP7830 look particularly appealing to me.

The 82240A/B uses a moving 8-element print head to print a column of dots at a time, as well as the paper transport mechanism to advance to the next line. The Martel models don't have a moving print head, instead using a fixed full-width 384-element thin-film thermal print head to print a single row of dots at a time, using the paper transport mechanism to advance to the next dot row. Offhand, it seems to me that this would mean less mechanical wear and tear, but on the other hand, perhaps a greater chance of a heating element failing.

But the last that I read, the Martel printers seemed relatively expensive, and I have no pressing need for another printer, so I've never actually tried one. But for someone who wants to buy a printer to use with these HP calculators, I'd advise getting information on the Martel printers before spending very much on an HP 82240A/B. For information on the Martel models, visit http://www.martelinstruments.com/.

Regards,
James


[ Return to Index | Top of Index ]

Go back to the main exhibit hall