Photograph of Jarno Peschier
My ICQ online status at home My ICQ online status at work

Top of web site
My guestbook

________________
Personal
Curriculum Vitae
Publications
M.Sc. Thesis [Java applet]
Work
________________
Miscellaneous
Search [UPDATED!]
News
Others
Browser issues
What's new?
________________
HP48 section
Software
Printer emulator
Printer codes
Emu48 KML
AUR review
INFORM
Image Alchemy
________________
Psion 5 section
Software
________________
Own information
Motorcycle [UPDATED!]
MIDI
Java [Java]
Genealogy
tlhIngan Hol
Horses
________________
Just links
Space & SF
Dinosaurs
Austria

HP82240B printer codes

[Picture of an actual HP82240B] Some people have asked me about the printer codes a HP82240B infra-red thermal printer, for which I've written an emulator, can understand.

I think this really is the kind of information that should be readily available to the HP48 programming community, so I decided to add this information to my web site for the benefit of everyone who needs this information.

Hopefully this might mean that there will be more programs for HP48 calculators in the future, that will be capable of hardcopy output and really support the (hardly ever used) capabilities of a HP82240B printer.

If you find any errors or omissions in the following information, please don't hesitate to let me know, so I can update the information. This information can also be found in the HP48 FAQ.

Size of physical row

One printed row is either 24 normal characters, 12 expanded characters or 168 pixels wide. This means that one normal character has a width of 7 pixels. Printed text "falling off the row" will wrap around the next line (on a character basis) while printed graphics will be truncated and ignored by the printer after pixel column 168.

Reset

ESC 255d
This resets the printer to the following state: Roman8 characterset (watch out: the powerup characterset is ECMA94), both expanded and underline printing off, buffer cleared.

Self test

ESC 254d
This causes the printer to print a selftest pattern. This mainly consists of a printout of the Roman8 characterset.

Expanded printing

ESC 253d
This turns expanded printing on. This means that from this code on all characters that are printed will be printed at twice the normal character width because each column of pixels is printed twice. Has no effect if expanded printing is already on.

ESC 252d
This turns expanded printing off. This means that from this code on all characters that are printed at normal character width again. Has no effect if expanded printing is already off.

Underlined printing

ESC 251d
This turns underlined printing on. This means that from this code on all characters that are printed will be underlined because the bottom-most pixel in each columns of pixels is now always on. Has no effect if underlined printing is already on.

ESC 250d
This turns underlined printing of. This means that from this code on all characters that are printed will not be underlined anymore. The bottom-most pixel in each columns of pixels is printed as it is defined for the printed character. Has no effect if underlined printing is already off.

Character sets

ESC 249d
This switches the printer to use the ECMA94 character set. This set is 100% identical to the character set used in HP48 calculators. This is the power up default of the printer. Has no effect if ECMA94 is the current character set already.

ESC 248d
This switches the printer to use the Roman8 character set. This set is different than the character set used in HP48 calculators in the 128 last character. As far as I know this set is used by older printers like the HP82240A and by HP28 calculators (hence the need for the OLDPRT command in HP48 calculators if you are printing to a HP82240A). This character set is turned on if you reset the printer with the reset code. Has no effect if Roman8 is the current character set already.

Graphics

ESC n data, with 1 =< n =< 247
This causes the printer to print graphics specified by the specified data (one byte per pixel column). The value n specifies the number of bytes of data that follow the printer code that will be interpreted as graphics data. Any data after pixel column 168 will be truncated and ignored.

Using these codes in your own programs

To make it as easy as possible for you to start using these codes in your printing programs, I've made a tiny library that contains the following:

XLIBDescription
ResetReturns reset code as a string
UnderlineTakes a string and puts the underline on code in front and adds the underline off code to the end of it
ExpandedTakes a string and puts the expanded on code in front and adds the expanded off code to the end of it
ECMA94Returns code to switch to ECMA94 character set as a string
Roman8Returns code to switch to Roman8 character set as a string
GraphicsTakes a string and let the printer interpret it as graphics by putting an ESC and the length of the string in front
SelftestReturns selftest code as a string

You can of course download this library(814 bytes) here. It also contains a simple UserRPL program that lets my HP82240B emulator produce the results you see below.

Happy printing!

[Printer code demonstration]

Top


© Copyright 1996-2000, Jarno Peschier, Westbroek, the Netherlands
HTML compiled from JHS source on 1 September 2000.