HP Forums
HP-42S with HP-82240B Printer - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP-42S with HP-82240B Printer (/thread-80894.html)



HP-42S with HP-82240B Printer - Joe D. - 10-31-2005

Hello,

I'm using my HP-42S in combination with the HP-82240B printer for several years now. But there's one big problem about graphics which I never managed to solve and that's why I'm seeking help from you.

Since the calculator's alpha register handles only 44 signs at the same time, any graphic sequence larger than 42 pixels (44 minus the two signs for the escape sequence) has to be splitted into two, three or four parts. So to print for example a 50 pixel wide graphic sequence, I have to enter the following: CLA, 27 XTOA, 50 XTOA followed by 42 times let's say 195 XTOA. To transmit the (still uncomplete) data to the printer I use the PRA-command. At this point the printer doesn't print anything, because he correctly awaits 50 signs, and writes the sequence into the buffer. No problem so far! But when I try to send the remaining 8 signs (CLA, 8 times 195 XTOA, PRA), the printer draws the following sequence:

OOXO
OOXO
XXOX
OOXX
OOXX
OOOX
OOOX
OOOX

before continuing with the correct graphic. In decimal code this means: 4, 4, 27, 252. So it seems that either the printer or the calculator (by means of the PRA-command) adds AUTOMATICALLY two right-stop line-feeds and one "return to normal width"-command. How can I prevent them from doing this?

P.S. To avoid this problem I always used the PRLCD command, but since the display of the HP-42S has only 131 pixels, I could never take advantage of the 35 supplementary pixels of the printer.

MANY THANKS IN ADVANCE!














Edited: 31 Oct 2005, 1:53 p.m.


Re: HP-42S with HP-82240B Printer - TomC - 10-31-2005

Hello Joe:
[This may not be an answer, but hopefully it helps.]

In the HP42s Manual, there is a printer plotting program which does not (cannot?) use the full width of the printer paper. I don't believe the HP42s can send hex codes to the printer (as the HP48 does), so you are limited to the width of the LCD display.

Good Luck,
TomC


Re: HP-42S with HP-82240B Printer - Joe D. - 10-31-2005

Thanks for your answer, Tom!

You're right! I know this program very well. I've even written my own version of it, so that it draws an y-axis too now (I simply couldn't understand why they had forgotten this). But it is obvious that this program CAN'T use the entire paper width because it doesn't directly address the printer. Nor does the enhanced version from the Advanced Programer's Manual (with up to 3 simultaneous functions).

My question however refers only to DIRECT printer adressing. This is undocumented in both HP-42S manuals, but you CAN use the escape sequences via 27 XTOA. So you can change v.g. the character set from ROMAN 8 to ECMA 94 which allows the use of greek letters.

By the way, why does the character code table at the end of the User's Manual show both decimal and hexadecimal codes for each character? Only by convention?


Re: HP-42S with HP-82240B Printer - James M. Prange (Michigan) - 10-31-2005

I'm not familiar with the 42S, but to find out what the printer does with whatever it receives, you might find the HP82240B Technical Interfacing Guide PDF useful.

Regards,
James


Re: HP-42S with HP-82240B Printer - James M. Prange (Michigan) - 10-31-2005

Quote:
By the way, why does the character code table at the end of the User's Manual show both decimal and hexadecimal codes for each character?

Well, sometimes it's easiest to use the decimal notation, and sometimes it's easiest to use the hexadecimal notation.
Quote:
Only by convention?

Actually, I suspect that showing both notations is somewhat unconventional. I wish more character tables would do this; it would sometimes save me the trouble of converting.

Regards,
James

Edited: 1 Nov 2005, 1:05 a.m.


Re: HP-42S with HP-82240B Printer - Joe D. - 11-01-2005

Thanks for this hint! Very interesting paper!
But it doesn't help in this situation, because I don't know what the PRA command does actually sent to the printer.

Regards,
Joe


Re: HP-42S with HP-82240B Printer - Thomas Okken - 11-01-2005

It's possible to find out what the 42S sends to the printer by using a 48 to capture its output. There is a prgram called INPRT that does this; I've used it myself to work out some details in the Free42 printer emulation.


In case you don't have a 48 yourself, I'd be happy to run some tests for you and send you the results.


Re: HP-42S with HP-82240B Printer - James M. Prange (Michigan) - 11-01-2005

An excellent suggestion! But note that the version of INPRT published by HP remaps many non-ASCII characters from their Roman 8 character set to their modified ECMA 94 character set, which can muddy the issue. However, there are versions available which either skip the remapping or "remap" all non-ASCII characters to themselves; look for one of these versions.

Regards,
James


Re: HP-42S with HP-82240B Printer - Christoph Giesselink - 11-02-2005

Instead of the INPRT version you can use the BINPRT program from the Clamshell/Pioneer ROM Upload package at http://privat.swol.de/ChristophGiesselink/Emu28/CPROMUPL.ZIP. This is a recompiled INPRT version without any conversation.

And here we have another possibility, using the PC version of Emu42 with the integrated debugger.

The IR transmitter routine is at

OUTBYT EQU #0318D (HP42S rev. A)
OUTBYT EQU #031D6 (HP42S rev. B/C)

and the character to transmit is located in A[B]. So it's easy to set a breakpoint in the debugger and watch the A[B] register.

I made a small test with "ABC" in the alpha register and I got (in HEX) with PRA

1B,FC,41,42,43,04

translated this means

1B,FC = print with normal character width

41,42,43 = ABC

04 = special line feed

This explain the entire behavior I think.

Regards

Christoph

Edited: 2 Nov 2005, 12:46 p.m.


Re: HP-42S with HP-82240B Printer - Joe D. - 11-02-2005

Vielen Dank!

Genau das hatte ich mir auch gedacht! Da ich leider keinen HP-48 besitze und daher auch den Emulator nicht installieren kann, möchte ich nachfragen, ob Du nicht für mich noch einige wenige Tests durchführen könntest.

Beste Grüße,

Joe