HP-IL ISA Card + EMU41 + Linux!



#13

It works! It works!

I purchased one of Cristoph's HPIL/PC boards because I wanted to transfer programs to my HP-41CX. I also wanted to look at the possibility of writing a Linux driver for the card, since DOS is not my favorite program loader.

I purchased an old Compaq P5 desktop, loaded it up with RAM, and stuck FreeDOS on one partition, and Slackware 10.1 on the rest of the 600MB disk. After confirming that the HP-IL card worked under native FreeDOS, I loaded the DOSEMU virtual machine on Slack. I already knew that EMU41 would run under DOSEMU (and FreeDOS) but the question remained: would it work with DOSEMU's primitive I/O port access? This just allocates a range of addresses and hands them to the virtual machine. I wasn't sure how many addresses to give DOSEMU, although I knew they would start at the base address of the ISA card, 0x700. The HP-IL chip docs said their were 8 8bit registers, but since I didn't know how they were mapped into the PC's memory (1 for 1?) I allocated 17 8bit addresses, 0x700 - 0x710 for the card in ~/.dosemurc. I also passed on IRQ 7 to the virtual machine. (Before doing this, I confirmed that neither the addresses, nor the IRQ were allocated in Linux.)

I connected my 41CX to the PC via the HP-IL, and fired up DOSEMU. I had the FreeDOS partition mounted at /dos, and mapped from autoexec.bat to drive E:. I changed to E:\EMU41 and fired up my (HP-IL enhanced copy of) EMU41. I turned on my 41CX, and saw the listing for Cristoph's HDRIVE1.DAT! I confirmed that I could transfer files between the PC and the 41CX.

So now I'm ready to start looking at a Linux driver for the card. I can use the debug facilities in DOSEMU to snoop on the communication between EMU41 and the real part of the loop through the card. Together with the copius docs from HP and others available for the chip and for the HP-IL protocol, that should help me write the Linux driver. I've never written one before, so this will be a fun challenge in itself. I'm already deeply into Linux Device Drivers, both the 2nd edition, covering 2.4 and the third edition, covering 2.6. Since Slack 10.1 runs 2.4.27, I'll probably start with that version.

I'll be adding a more extensive writeup to the articles area, but I wanted to report this success here, and engage discussion with all of you about the upcoming work.


Edited: 25 June 2005, 10:49 p.m. after one or more responses were posted


#14

Excellent work, Howard!

I've never written a Linux device driver, but I'm part-way through Love's "Linux Kernel Development" book, and I understand a lot of the issues. An HP-IL driver would be a popular resource - every time I pick up "Linux Journal" I'm impressed by both the number and the quality of the scientific projects that are using Linux.

I don't have any HP-IL gear myself, but I'm tempted to get some. just to get involved!

Best,

--- Les

[http://www.lesbell.com.au]


#15

"Linux Kernel Development" is great. As the title suggests, it's focussed on writing code in the kernel. Most other books I've read on kernels, Linux, BSD SysV, are theoretical works. You need the theory to be able to code, but examples are darned helpful too! At the other extreme, there's the kernel source itself. But even when used together with LXR, that's an awfully large chunk to try to digest. So Love's book is a good balance.

"Linux Device Drivers" also has a practical focus with examples. It's a nice complement to LKD.

Edited: 25 June 2005, 10:54 p.m.


#16

Hi, guys;

I'm addicted to Linux as well, but mainly because of professional demands, I must regularly use Windows® environment. Please, consider that I do not complain for the fact I must use Windows® environment, I'd just like to have more chances to use Linux in a regular basis.

About HP, Linux and RPN. The simplest calculator implementation under BASH is an RPN calc (forgive me, I don't recall the command line to invoque it). Another fact: HP used to fully support Linux about three to four years ago. Anyone knows about this? And Nonpareil is Unix/Linux based...

I read many texts concerning Linux development, HW and SW. I still want to deal with measurement under Linux-based PC's running graphics applications (GPL?) that read custom/commercial acquisition boards. Is there any public e-place (groups) where these issues are discussed? I remember reading a few, now I'm somehow off-line... Want to get on board again. Any suggestions?

Cheers and thanks.

Luiz (Brazil)


#17

Quote:
The simplest calculator implementation under BASH is an RPN calc (forgive me, I don't recall the command line to invoque it)

That's almost certainly dc. man dc for cryptic help on how to use it.

Quote:
HP used to fully support Linux about three to four years ago

If the latest sales figures are to be believed, HP is the leader in the Linux-on-Intel server market, selling approximately 1.5 times as many servers as IBM (going on memory of an article a few days ago, here). Personally, I think IBM *supports* Linux more, but HP probably makes more money from it.

Quote:
I still want to deal with measurement under Linux-based PC's running graphics applications (GPL?) that read custom/commercial acquisition boards. Is there any public e-place (groups) where these issues are discussed?

I'm not active in that field myself - just impressed by what I read - but you might want to start here: http://sal.linet.gr.jp/index.shtml. I'll have a look through my bookmarks and see what I might have on file, too.

One nice application that I *do* use from time to time is Octave: http://www.octave.org/.

Best,

--- Les

[http://www.lesbell.com.au]


#18

Good 'ol dc.

4 2 + p
6
3 / p
2
4 / p
0

Yup. Integer only!


#19

Quote:
Yup. Integer only!

Nup - arbitrary precision, set with the k command:

[les@sleipnir les]$ dc
2 k
4 2 + p
6
3 / p
2.00
4 / p
.50

(Disclaimer: I contract to IBM, supporting Linux.) ;)

Best,

--- Les

[http://www.lesbell.com.au]


#20

Well, I'll be damned!

You know, I love it that I can learn something new about Unix, 17 years after I started using it seriously. Obviously, I don't use dc much, or I would have known that you could do arbitrary precision with it. (The words "arbitrary precision" appear in the first sentence of the man page.) The OpenBSD man page for dc has the following reference:

Quote:
L. L. Cherry and R. Morris, "DC - An Interactive Desk Calculator", USD:05.

That's probably Robert Morris from Bell Labs, so the thing has a long history.

#21

Thanks, Les Bell. Sorry taking too long to read your answer... and to thank for it.

I added a few info to the answer I posted to Howard, right below. Please, Les Bell, have you found some important material that you already have and can send me, I'd be glad receiving:

lcvieriaat quantica dot com dot br

Best regards.

Luiz (Brazil)

Edited: 26 June 2005, 7:03 p.m.


#22

Luis,

Sorry, I haven't had a chance to dig much in the way of data acquisition-related links out of my bookmarks. It's not an area I do any work in, anyway, so I doubt that I'd have all that much. When I get a chance, I'll do some digging.

Meanwhile, try this: head on over to http://www.linuxjournal.com and use the search box at the top left of the page to search for "data acquisition". I just tried it, and it returned what looks to be around 50 hits. One that caught my eye was "GPIB: Cool, It Works with Linux!". That little lot should keep you reading for a while!

Best,

--- Les

[http://www.lesbell.com.au]

#23

I work for IBM supporting Linux. And although HP is a competitor, they do support Linux on their hardware in a big way. Les's message has more information. 8)

Quote:
I must regularly use Windows® environment.

So must we all. I have to use Windows to work inside IBM, because there are still some applications that require IE. There is a big push underway to update those apps so they can be run using Mozilla or Firefox on any platform, but in a company the size of IBM, it takes a long time.

Quote:
Is there any public e-place (groups) where these issues are discussed?

I'm into HP calculators for the fun of it. The last time I was involved in scientific computing was in 1992. Les's links look like a good jumping off point. There are also some usenet groups that look relevent. (Links are to Google Groups).

The first group is concerned with control systems generally. The next two are for National Instruments, so they contain a lot of information regarding GP(HP)-IB measurement and control equipment. Windows, MacOS and Linux all seem to be represented. The last two are more graphics oriented, in case that's your main interest.

As far as I know, HP-IL is mostly dead in actual production use. You do see volt meters and such go by on eBay with HP-IL interfaces occasionally. But I'm not sure if it's collectors buying them, or if there are actually HP-85s with HP-IL interfaces still working out there. (My HP-85 is on its way! 8)


#24

Hi, Howard;

as I mentioned to Les Bell, sorry taking too long to answer.

I'll do my research, now. My interest on graphics is mainly on having an on-screen analog signal view (as in an oscilloscope) and digital bus signal analysis, as we can see in a digital analyzer. AFAIK, the acquisition board needs manily a fast A/D converter for analog signals and as many registers as the number of lines you want to analyze so you can capture the bus state from time to time. The way you see the resulting captured data depends on SW. With the new processing speed and with the help of Linux graphics development tools, I guess we can have many good stuff with low-budget capture boards. When I saw low-budget I do not mean bad quality products, instead the simplest HW possible so we can have faster capture times. About the SW, as I intend using these resources to analyze low-speed equipment, I guess it's not hard to try some homebrew solutions.

Best regards.

Luiz (Brazil)

Edited: 26 June 2005, 6:53 p.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Is Linux common among us RPN types? db (martinez, ca.) 46 4,647 12-11-2013, 08:25 PM
Last Post: Paul Guertin
  HP-41(CL): The easiest way to transfer FOCAL programs from a Linux PC to the HP-41 Geir Isene 13 1,852 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  EMU41; Dosbox on Linux; Excruciatingly sloooow Geir Isene 9 1,097 12-01-2013, 05:10 PM
Last Post: Geir Isene
  How to move lexfiles from PC to 71 w/o HP-IL? Joe Horn 9 1,120 10-18-2013, 03:50 PM
Last Post: Christoph Giesselink
  Hand Held Products RS232 to HP-IL aj04062 11 1,186 08-31-2013, 07:12 PM
Last Post: Paul Berger (Canada)
  HP IL over wifi ... (ILPer & go71b) Olivier De Smet 12 1,415 08-20-2013, 05:44 AM
Last Post: Olivier De Smet
  Building WP 34s emulator on Linux Eric Smith 3 523 07-25-2013, 03:03 PM
Last Post: Marcus von Cube, Germany
  trouble flashing wp34s under Linux Glenn Becker 8 912 07-23-2013, 02:21 AM
Last Post: Marcus von Cube, Germany
  Is there a HP50g emulator for Linux? Matti Övermark 2 498 07-03-2013, 07:40 AM
Last Post: Matti Övermark
  wp34s flashing with linux. Thomas Windisch 6 758 05-14-2013, 07:40 PM
Last Post: Harald

Forum Jump: