Transfering data from a HP50 to a PC



#15

When I had a working HP 48 I could transfer data from the HP to a PC in ASCII format.It appears that you can do the same with the HP 50. The same commands are there but it seems like that only binary transfer is acceptable.

I have now started using the SD cards for transfering. They seem to be much more reliable. But again the same problem.

Is ther any way of transforming binary into ASCII ?


#16

Quote:
When I had a working HP 48 I could transfer data from the HP to a
PC in ASCII format.It appears that you can do the same with the HP
50. The same commands are there but it seems like that only binary
transfer is acceptable.

I have now started using the SD cards for transfering. They seem
to be much more reliable. But again the same problem.

Is ther any way of transforming binary into ASCII ?


Yes.

The 48G and newer have both Kermit and Xmodem protocols available.
For whatever reasons, the Xmodem protocol is still binary-only,
although the SysRPL commands needed for "ASCII" transfers are
built-in and an ASCII transfer option could easily be added to
Xmodem transfers. After all, with the 49 series, they added the
Xmodem server capability, so why not also an Xmodem ASCII transfer
capability? For that matter, MMC/SD card transfers are also
binary-only even though an ASCII transfer option could easily be
added for them too.

If you transfer using IrDA, you can use the Kermit protocol and
choose "ASCII" mode.

The 50g has a "serial" (but not RS-232 compatible) port. You can
now buy a cable with a built-in level-shifter at a reasonable
price, from http://commerce.hpcalc.org/. Note that you'll
also need a female-to-female "null modem" to connect Eric's cable
to a PC's COM port. I've noticed that since Eric has made his
cable available, a different source (which, as far as I can tell,
typically charges the highest price that the market will bear) has
slashed its price for its cable, but it's still about double
Eric's price, and there have been reports of problems with that
other cable. Or of course you can build your own cable as a
do-it-yourself project. Anyway, using the serial port plus a
level-shifting cable, you can use the Kermit protocol.

Note that HyperTerminal PE can do either Kermit or Xmodem
transfers, and
HPComm (the
"Connectivity Kit" designed for the 49G) uses the Kermit protocol.
For either of these, you'll need a COM port. A USB/RS-232
converter should work. In the case of IrDA, with MS Windows 98SE,
a "virtual COM port" should be available when IrDA is installed on
the PC, but for XP (and, I suppose, Vista), you may well have to
install
IrCOMM2k or
something similar to get the virtual COM port.

But I expect that most users connect to their PCs using the
supplied USB cable, and as far as I know, the only MS Windows
compatible software for USB connections is Conn4x (the supplied
"Connectivity Kit" for the 49g+ and 50g). Conn4x does have a
"text" transfer mode. After connecting, in the "File" menu, choose
"Binary transfer mode, press for text mode". Or easier, there's a
button that by default is labelled "010101" (meaning binary mode);
click it to change it to "ABCD" (meaning text mode). Conn4x uses
the calculator to decompile objects, but does the character
translations itself (on the PC). Note that the translation mode in
IOPAR (set by TRANSIO) is ignored; to set the translation options,
use "Options..." in the Conn4x "View" menu. The Conn4x "text"
translations are almost the same as the Kermit "ASCII"
translations; see the help file for any differences. Also note
that variable names are, if needed, translated to MS
Windows-compatible file names; again, see the help file.

By the way, the version of Conn4x that came on the CD with the
calculator may well be buggy.
Version 2.2 Build
2353
works for me, but
Version
2.3 Build 2439
might be better; I rarely actually use
Conn4x.

Note that the 49 series decompiles a NUL (ASCII control code 0) to
\00, a literal " (double-quote character within a character
string) to \", and \ to \\. With a Kermit ASCII transfer using
translation mode 2 or 3, these are translated to \\00, \\", and
\\\\. Conn4x "simplifies" these three translations, but only when
they occur within a quote-delimited character string, and in rare
cases (as far as I know, some cases of a \ character outside of a
quote-delimited character string) this can cause a mistranslation.
It may be necessary to edit (in the PC file) \ to \092, but this
is needed only where the \ and the 2 or 3 characters immediately
following would make a valid translation sequence, and only
outside of a quote-delimited character string. Finding any other
mistranslations is an exercise for the student.

For that matter, Kermit ASCII translations can go wrong too, if
you happen to have a <CR><LF> (CarriageReturn-LineFeed) pair in a
character string using translation mode 1, 2, or 3. In this case,
in transfers from the calculator, the <CR><LF> pair is left as-is,
instead of being translated to <CR><CR><LF>. But on transfers back
to the calculator, the <CR><LF> pair is translated to just <LF>,
even if it was originally a <CR><LF> pair. Conn4x does avoid this
bug.

In the 48 series, a character string that contain a literal " is
always decompiled to the "counted string" form. I don't know of
any way to get a 49 series to decompile to a counted string form,
but it compiles them just fine.

I really prefer to use an MMC or SD card for transfers. I wrote a
pair of programs to convert between binary objects and characters
strings suitable for Kermit ASCII compatible transfers using a
card. These are UserRPL programs (well, they do use a couple of
SYSEVAL sequences), so they may take a few seconds to run. On the
other hand, commented source code files and a README.TXT file are
included, so they should be fairly easy for a user to customize;
for example, how to translate <LF> characters, and whether to
leave the original commented source code string on the stack when
converting to a binary object. As stored on the card, the first
line of the file will be an "HPHP49-X" binary transfer header,
followed by 5 bytes for the character string prologue address and
length; it's best to edit this line out with a text editor on the
PC. See http://www.hpcalc.org/search.php?query=ASCII+on+SD.

For that matter, it should be fairly easy to port my programs to
SysRPL in case anyone feels inclined to do so, and using some code
invoking the underlying ARM processor, it might be possible to
store a file on the card without the binary transfer header.

Regards,
James


#17

James, I just want to once again compliment you on your posts. Every time I see some 48-family message or question come up, I know it's going to be followed by one of the best, most helpful and thorough replies that anyone could expect.

Messages like yours make this website and forum "THE" place to go for help from HP experts.

Great job!

thanks,
bruce

Edited: 25 Sept 2007, 12:29 p.m.


#18


#19

Thanks, guys; it's nice to know that some readers appreciate my posts about RPL models.

Regards,
James


#20

Hi James.

Quote:
Thanks, guys


Well, you're welcome, definitely :-)

Quote:
...some readers appreciate my posts...



I'm not sure "appreciate" gets it across ;-)

Just consider I created a "JMP Posts" sub-directory into my "Knowledge Base" dir, where I store all your posts for future reference.

And I do that with other "selected" valuable contributors on this and other forums / newsgroups :-)

Thanks once again to all of you that share your knowledge in a comprehensible way.

Warmest regards.

Giancarlo
#21

PS:

You might also want to have a look at this other post.

Regards,
James

#22

I've recently bought a HP 50G, and am having problems connecting to an IBM Thinkpad. There is a fault with the install CD in that it refuses to install the usb driver.

I tried the two downloaqds that you suggested, but it still won't connect. In the connex screen on the laptop, it doesn't show that there is a usb connection like in the user diagram example. A screen comes up saying there is no usb connection. On the HP 50G, it shows Xmodem etc, so it's OK, so I figure I haven't got the usb driver for the laptop.

I've also got a Mac and have no trouble connecting to it. Any suggestions would be greatly appreciated.

John D


#23

Hi. I have had the same problem intermittently with my ThinkPad and with my XP Desktop. Sometimes it works, sometimes not. I finally stopped messing with the cable and bought an SD Card Reader. It just makes more sense in the end and there is less fussing about.


#24

any way to capture a screen to SD card? I am using a Mac and need to transfer a screen (solver) to show a solution

Miguel


#25

Quote:
any way to capture a screen to SD card? I am using a Mac and need
to transfer a screen (solver) to show a solution

Well yes, on capturing a screen image to the card, but how to
display it on your Mac, I don't know.

The screen capture functions in Conn4x and HPComm rely on the user
invoking a PRLCD (PRint LCD) command, then capturing the output,
and displaying it as an image in another window. HPConnect seems
to lack this feature.

I don't know of any way to redirect the PRLCD command's output to
the SD card, and even if there were, your Mac (or an MS Windows
PC, for that matter) wouldn't know how to display it as an image,
without an application designed to do so.

But you could use the LCD\-> command to capture a screen image to
the stack as a grob (graphics object). You probably wouldn't want
to key it in from the command line, because then the image would
include the command line. Unfortunately, there doesn't seem to be
any built-in "keyboard shortcut" for the LCD\-> command, as there
is for the PRLCD command. The LCD\-> command is on page 2 of the
PRG GROB menu, or of course you could assign it to a user key or a
custom or temporary menu.

Anyway, you can store the resulting grob as a binary transferred
file on the SD card. But how to display it on your Mac? Good
question; hpcalc.org lists various MS Windows applications for
converting a grob file to quite a few different image file formats
which could be viewed on a PC, but, offhand, I don't see any grob
converters for the Mac. Maybe try some searches at hpcalc.org, or
ask at the comp.sys.hp48 newsgroup.

Regards,
James

#26

Quote:
I've recently bought a HP 50G, and am having problems connecting
to an IBM Thinkpad. There is a fault with the install CD in that
it refuses to install the usb driver.

I tried the two downloaqds that you suggested, but it still won't
connect. In the connex screen on the laptop, it doesn't show that
there is a usb connection like in the user diagram example. A
screen comes up saying there is no usb connection. On the HP 50G,
it shows Xmodem etc, so it's OK, so I figure I haven't got the usb
driver for the laptop.


Which operating system? MS Win 98? 98SE? ME? 2000? XP? Vista?

Are other USB devices working correctly when connected to the same
port?

Maybe try a different USB cable?

At least with older versions of Conn4x, I sometimes had to fool
around with things like unplugging the USB cable and plugging it
back in for the calculator to show up. I no longer use Conn4x
enough to know whether that's still the case, but it may be worth
a try.

How about in Windows' Device Manager? With the calculator turned
on and connected via the USB cable, even without being in Xmodem
Server mode, Device Manager should show a device named "HPx9G+
DEVICE"; can you find that? The current version is 1.2.

The Conn4x downloads include the USB driver files. In the current
version, these are HPx9G.inf, HPx9G2k.sys (for 2000, XP, and
Vista), and HPx9G98.sys (for 98, 98SE, and ME). Installing Conn4x
normally copies the files to the subdirectory "\Program
Files\Hewlett-Packard\Conn4x\USBDriver\". When Windows tries to
install the driver, you may have to tell it to look in either this
subdirectory or wherever you unzipped the downloaded file to.

There's a chance that you might have to first uninstall any older
drivers, for any USB ports where they've been installed. The
easiest way that I know of to find them all is to boot to "Safe
Mode", where even devices that aren't currently connected are
shown, but you could do it by plugging the calculator in to each
USB port on the system.

Maybe also try searching for any files in \Windows\ and its
subdirectories that contain "HPx9G" in the filename and delete them. Maybe also
try cleaning the Windows registry of anything that refers to these
files.

Of course, after uninstalling old drivers, deleting old files, and
cleaning the registry, try re-installing the current drivers.

Quote:
I've also got a Mac and have no trouble connecting to it. Any
suggestions would be greatly appreciated.

Use the Mac.

Other than that, ask on the usenet group comp.sys.hp48.

Regards,
James


Edited: 30 Sept 2007, 11:30 p.m.


#27

Hello James,
Thanks for your detailed post regarding device manager etc, the HP 50G is now up and running. The driver was there, but not installed with the other software. This is the only time I've had this happen, so if it happens again. I'll know where to look.

This is an incredibly informative site, and I'm truly thankful for the generosity of the 'posters' here.

John D

#28

James thanks for your help. I am now using your programs to convert binary to ascii and the reverse, using a SD card. They work just great and are exactlly what I was looking for.

Regards Stuart


Possibly Related Threads...
Thread Author Replies Views Last Post
  rolinychupetin hp50 lbintz4 3 522 12-09-2013, 01:10 PM
Last Post: Peter Murphy (Livermore)
  Question about transfering programs to the HP Prime Namir 10 868 11-17-2013, 04:01 PM
Last Post: Namir
  Sheet data importer for HP Prime Marek Russ 4 479 11-15-2013, 04:55 AM
Last Post: debrouxl
  Entering,Saving,and Analysis /Fitting X Y Data on the Prime Harold A Climer 6 664 10-26-2013, 01:54 PM
Last Post: Tim Wessman
  I went for the hp50 over the prime... eri 14 929 10-25-2013, 01:23 PM
Last Post: eri
  HP PRIME: How to change the column headers and reset data Joseph Ec 5 547 10-18-2013, 02:26 PM
Last Post: Joseph Ec
  Transfering HP-85A Programs Gerry Schultz 5 587 10-17-2013, 12:30 PM
Last Post: Philip Reagan (Texas)
  HP Prime data sharing Alberto Candel 5 550 10-06-2013, 07:49 PM
Last Post: Alberto Candel
  Printing HP 9825 data Norman Pillsbury 3 429 06-01-2013, 10:08 PM
Last Post: David Ramsey
  WP-34s data exchange with PC over IR Marcel Samek 3 396 02-26-2013, 11:53 PM
Last Post: Marcel Samek

Forum Jump: