Post Reply 
HP-41 <> USB-41 bidirectional comms.
03-29-2014, 06:30 AM (This post was last modified: 03-29-2014 06:41 AM by Diego Diaz.)
Post: #1
HP-41 <> USB-41 bidirectional comms.
Hi all,

If you have a USB-41 interface module, this may be an interesting reading... if you don't have the USB-41 (yet), it may be interesting for you... to get one! :-)

As the title says, I've managed to develop the (too long awaited) bidirectional communication interface between the HP-41 and USB port using the USB-41 interface module.

Note that this is still preliminary and therefore by downloading (here) you're in Beta-tester mode.

In short it allows sending .ROM files from/to your PC and your HP-41 HEPAX RAM pages using HEPAX's COPYROM command, so it does not use a page itself. Also, since HEPAX allows saving *everything* including FOCAL programs and registers into its HEPAX RAM, this virtually means that you can move everything from ROM pacs to your own FOCAL or M-Code programs to your PC and get them back to your HP-41 at will.

Below the notes included in the down-loadable archive:

--- Notes on the USB-41 page transfer utility ---

*********** PRELIMIRARY ***********

Download link: http://www.clonix41.org/Projects/USB-41/USB-41-3.rar

This .rar archive contents the files required to test your USB-41 interface module page
trasfer functionality. Download and extract to your working directory.

Since the aim of this utility is to copy .ROM pages between your PC and your HP-41, some
device with RAM memory is required to be installed into your HP-41 in order to operate.
The HEPAX module or any NoV module running HEPAX can be used.

The HP-41CL running HEPAX is suppossed to work but I haven't yet been able to test this
configuration for now. Please report if you manage to test such CL configuration.

NOTE: This utility will only RUN at 1x clock rate.

The COPYROM command is used to handle the transfer process either from HP-41 to PC or
from PC to HP-41. For this purpose the File in your computer is to be considered as page
number #7.

NOTE: Actually for the HP-41 to PC transfer it is not relevant, since any page transfer will
be copied into the specified .ROM file. For PC to HP-41 it is mandatory that the source page
is #7.

The USB-41-3.exe file will run in your computer under windows; it has been tested on
Win 7 32 & 64 bits versions. Please report if you test it on other windows platform.

The two .OCX (ActiveX) controls included are required for the program to run just in case
you don't have them already installed. They can be kept in the working directory.

The ClonixU3.HEX file is the code to be programmed into your USB-41 interface module.

Run microbrn.exe, and select "Load file" to program your USB-41 as usual.

Once it is programmed connect it to your HP-41 calculator, connect the USB port
end of the cable to a suitable port of your PC, turn your calculator ON and run
USB-41-3.exe in your computer.

Make sure your COM port is shown in the Port selection field. Check windows device manager
if necessary to confirm the port number assigned to your COM port.

Note that this utility only manages COM1 to COM9 serial ports. You can change the COM port
number in the device manager if required.

Hit the Refresh button, in case you have added a new port, in order to let it show up in the
Port selection field.

Click on the File selection filed to choose either an existing .ROM file or to name a new
.ROM file.

In your HP-41 enter the required info for the COPYROM command:
- source page number into Y register
- destination page number into X register
NOTE: It is convenient to have the COPYROM command Assigned to a key in order to facilitate
its execution.

To send a page to your HP-41:

Click on "Send page" in your PC window, then key [7] [ENTER] [nn] [COPYROM] in the HP-41.
[nn] is the RAM page number where you want the .ROM image to be copied to.
[COPYROM] is either typed in ([XEQ] [ALPHA] COPYROM [ALPHA]) or (preferrable) assigned key.

To Receive a page from your HP-41:

Click on "Receive page" in your PC window, then key [nn] [ENTER] [7] [COPYROM] in the HP-41.
[nn] is the RAM page number you want to be sent to the selected .ROM file.
[COPYROM] is either typed in ([XEQ] [ALPHA] COPYROM [ALPHA]) or (preferable) assigned key.

Please mail me or post any comment, hint, problem... praise... :-) you may have.

All the best from Caribbean Sea.


Diego.

PS: Screenshot of the very simple GUI, some of you will be happy to know that this is just VB6. I'm planning to get rid of the .NET as soon as I can.

[Image: HP-USB_scrsht.jpg]

"Do not suppose, check it twice."
Find all posts by this user
Quote this message in a reply
03-29-2014, 07:12 AM (This post was last modified: 03-29-2014 08:06 AM by Ángel Martin.)
Post: #2
RE: HP-41 <> USB-41 bidirectional comms.
Excellent news Diego, the "missing link" (pun intended) of the Clonix Family at last!
Will try it out today on the CL - still using XP, hope that's not a problem?
Later...

Edited: Will it also work burning the HEPAX ROM and RAM on the USB41 itself, or the needed code won't be there?
Edit2: Never mind, there's no RAM in the USB41 - what was I thinking...

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
03-29-2014, 09:06 AM
Post: #3
RE: HP-41 <> USB-41 bidirectional comms.
[Image: bender-applause.gif?w=690]

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
03-29-2014, 05:49 PM
Post: #4
RE: HP-41 <> USB-41 bidirectional comms.
Great! 8-)
If I have a chance, I will try it this week end.
Since Angel will try it with a 41CL on Windows XP,
I will try it with a HP-41CX, NoV-64 (HePaX) & USB-41 setup
on Windows 7 Pro 32 bits in a Parallels VM v9.0 on OS X v10.9.2.
Thank you Diego!
Best regards,
Sylvain
Find all posts by this user
Quote this message in a reply
03-31-2014, 06:32 PM
Post: #5
RE: HP-41 <> USB-41 bidirectional comms.
Hi again,

And thanks for your kind words and your contributions.

I'm affraid my notes were not much clear regarding some of the limitations of this communication SW.

The main one, (which I think is the cause it has failed on the CL attempts to Receive a page) is somehow "hidden" in the comment regarding the source/destination page numbers: since the page sent form PC to HP-41 *must" use page #7 as the source; page #7 must be empty! Otherwise random data is to be transmitted and therefore chances to crash due to polling points erratic behaviour.

Since most CLs make use of page #7 it won't work as expected.

The same incompatibility applies to the HP-IL module.

The printers (either IR or 82143A) will cause same problem too. Although printer code itself goes to page #6, it forces HEPAX code to be placed into page #7 with similar results.

I'm working in the mods to allow usage of page #F instead, which I hope to be far less conflictive.

My apologies for not making this point clearer on first instance.

Not as serious as the above one but still a bug, it seems that in some occasions, the last word (namely the last byte of the checksum) of a page is not transmitted to the PC, rendering a 8,191 bytes .ROM file.

Although I haven't yet found the origin of such bug, it can be easily overcome and next version of the SW will prevent this from happening.

Thanks again for your support and contributions and best wishes.

Diego.

"Do not suppose, check it twice."
Find all posts by this user
Quote this message in a reply
04-01-2014, 05:58 AM
Post: #6
RE: HP-41 <> USB-41 bidirectional comms.
It's always possible to leave page#7 empty on the CL using the MMU settings - in fact I think it's better to use that page for the USB41 than any of the external ones, specially on Clonix\Novo configurations. So far I managed to upload ROM images to the PC but still haven't succeeded the other way around, will try again the week-end. It may be a faulty USB connector perhaps...

Cheers,
'AM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
04-01-2014, 11:39 PM
Post: #7
RE: HP-41 <> USB-41 bidirectional comms.
Hi all,

And STOP the machines!!...

Thanks for your contributions I've found that the clock timing is too tight to be compatible with most every HP-41 (except those a bit above the 370KHz).

This is entirely my fault, please accept my apology for wasting your time beta testing this...

My only excuse is that I just have with me my coconut CX @371KHz, (in which I did my successful tests) and a 2x halfnut CV @749KHz; so I was very limited of resources, hence the post asking for beta testers help. But didn't anticipate the bad results.

Rest assured, this won't happen twice...

Next version will be tested with the whole range of models/speeds before offering it to the wild... (so to say... :-)

Thanks again and best wishes.

Diego.

PS. Fortunately things doesn't work on first attempt quite often... Otherwise, this will be really boring!

"Do not suppose, check it twice."
Find all posts by this user
Quote this message in a reply
04-02-2014, 03:36 AM
Post: #8
RE: HP-41 <> USB-41 bidirectional comms.
(04-01-2014 11:39 PM)Diego Diaz Wrote:  "Do not suppose, check it twice."
That's not always enough.
Find all posts by this user
Quote this message in a reply
04-02-2014, 05:04 AM
Post: #9
RE: HP-41 <> USB-41 bidirectional comms.
(04-01-2014 11:39 PM)Diego Diaz Wrote:  This is entirely my fault, please accept my apology for wasting your time beta testing this...

Not a problem at all Diego, it's been rewarding going thru the testing and remembering the ins and outs of the USB-41 - so nothing to apologize about. And now you're closer to a better design, so it's been valuable as well.

Best,
'AM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
04-02-2014, 11:52 PM
Post: #10
RE: HP-41 <> USB-41 bidirectional comms.
Hi Thomas,

Yes for sure... a more appropriate approach would be: "Do not suppose, check it exhaustively." Though, regrettably, this is not always possible... :-)

Ángel,

Indeed, the missing last byte has now been found and fixed; and the main misfunction due to (so to say) timing shift, is mostly isolated in the USB interface (inside the connector).

One of the two (in theory) functionally identical models; the one that needs a Xtal, is not working as reliably as expected.

Now I'm trying to figure out if it is a method to "adjust" it by SW, or if I'll need to recall these units and replace this part for the (newer) Xtal-less.

Will keep you informed.

Thanks again for your sontinued support and best wishes.

Diego.

"Do not suppose, check it twice."
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)