Post Reply 
Arduino Board as HP-IL device?
04-02-2014, 08:49 PM
Post: #1
Arduino Board as HP-IL device?
I don't know much about electronics, however, as you can implement nearly anything with an Arduino board I'm wondering if you can also make one acting as a HP-IL device. I see two basic variants:

  1. An Arduino board with an USBSerial adapter and a PIL-Box; this seems to be the easier variant as the IL signal processing is already done inside the PIL-Box.
  2. An Arduino board which connects directly to an IL interface through the analog pins on the board. Not sure if this is really possible but there are analogRead/Write functions that might be used to read/write the IL signal.


The Arduino board might be battery powered. Therefore, you would have a small battery powered device which might, for example, serve as an HP-IL mass storage device. The benefits I see are:
  • you don't need to startup your computer to save/load some programs to your IL capable HP calculator
  • you could easily exchange programs on SD cards
  • it might be quite a mobile solution to take with you
  • it might be a path to many other exciting applications
  • ...

Anyone who can assess this idea? Is it possible to implement that with "reasonable" efforts?
Find all posts by this user
Quote this message in a reply
04-02-2014, 09:11 PM
Post: #2
RE: Arduino Board as HP-IL device?
(04-02-2014 08:49 PM)Jurgen Keller Wrote:  I don't know much about electronics, ...

Same here. I found a project where an Arduino or equiv was able to act as an analog modem in software. No special HW required.

It'd be great to have an updated SW only PIL-Box based on Arduino or RPi.

My kid is a Solidworks and 3d printing guru. Perhaps its time to see if we can print HP-IL connectors to spare cutting cables.
Find all posts by this user
Quote this message in a reply
04-03-2014, 12:13 AM
Post: #3
RE: Arduino Board as HP-IL device?
Yes it could be done M. Garnier based his design on a PIC and I am pretty sure the even the Arduino Uno is at least as powerful a processor and there are other versions of Arduino that are considerably more powerful than the Uno.

The HP-IL signal is not analogue it is a differential digital signal that uses the direction of transition to indicate 1s and 0s.

One other approach that occurs to me would be to clone the 1LB3 chip with a CPLD or FPGA, I have thought about trying this but have little incentive as I have a good supply of 1LB3 chips that will do me for the foreseeable future.
Find all posts by this user
Quote this message in a reply
04-03-2014, 08:13 AM
Post: #4
RE: Arduino Board as HP-IL device?
The simplest way to connect the Arduino board to the HP-IL is to connect it to my PIL-IO board with the serial logic-level link (UART type). The HP-IL protocol is managed by the PIL-IO, the Arduino board can send/receive data as a HP-IL device, and can emulate devices like display/printer/instrument/plotter/interface. But NOT mass storage since the "Filbert" protocol is using the HP-IL device-dependant commands (DDL/DDT).

For full HP-IL capability (including HP-IL controller capability), the PIL-IO must be equiped with the firmware of the PIL-Box, so still using UART link instead of USB. The complete HP-IL protocol is then translated to the serial link and the Arduino board has to manage it, see the ILPer (device) or ILCtrl (controller) code for instance.

And the last option is to manage the HP-IL signals directly from the Arduino CPU. Note that this is quite CPU demanding with fast highest-prority interrupt (for input), extended interrupt-disabled periods (for output), and the capability to sample both the HP-IL lines at at least 2MHz frequency. I don't know if this is possible on the Atmel chip.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
04-06-2014, 10:02 AM
Post: #5
RE: Arduino Board as HP-IL device?
J-F,

I think a mass storage device is the most interesting application so option #1 is eliminated. Option #3 (Arduino CPU manages HP-IL signals directly) seems to be quite challenging, with many unknowns. Therefore, in my opinion option #2 is the most realistic one.

Quote:The complete HP-IL protocol is then translated to the serial link and the Arduino board has to manage it, see the ILPer (device) or ILCtrl (controller) code for instance.
I think I could manage this part. In the past I did some experiments with rewriting ILPer in Python.

Quote:For full HP-IL capability (including HP-IL controller capability), the PIL-IO must be equiped with the firmware of the PIL-Box, so still using UART link instead of USB.
It's not clear to me how much effort that would be, and if this is straightforward or rather a difficult job. What do you think?
Find all posts by this user
Quote this message in a reply
04-06-2014, 10:27 AM
Post: #6
RE: Arduino Board as HP-IL device?
I just noticed that at least the D2XX variant of the FTDI drivers are available for Raspberry PI (see here). That would reduce the job to rewrite ILPer for Rasperry PI using the D2XX interface instead of serial communication. That still might be quite some work but to me looks like the cheapest way with respect to efforts. Or did I miss something?
Find all posts by this user
Quote this message in a reply
04-07-2014, 03:50 PM (This post was last modified: 04-07-2014 03:54 PM by J-F Garnier.)
Post: #7
RE: Arduino Board as HP-IL device?
(04-06-2014 10:02 AM)Jurgen Keller Wrote:  
Quote:For full HP-IL capability (including HP-IL controller capability), the PIL-IO must be equiped with the firmware of the PIL-Box, so still using UART link instead of USB.
It's not clear to me how much effort that would be, and if this is straightforward or rather a difficult job. What do you think?

Well, installing the PIL-Box firmware on the PIL-IO just means plug the existing PIL-Box uC on the PIL-IO board. Or, if you prefer, remove (or disconnect ) the USB module from the PIL-Box and add a connector for the serial lines and the supply. So almost no effort:-)

Quote:I just noticed that at least the D2XX variant of the FTDI drivers are available for Raspberry PI...
I think that the Raspberry PI is using Linux (I don't know much about it), if so the FTDI VCP driver for Linux can probably be used.

Regarding the connection to the Raspberry: I just had a quick look, and it seems that there is no UART-type serial link nor RS232. Just USB. In that case you need the standard PIL-Box with USB.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
04-08-2014, 09:34 PM
Post: #8
RE: Arduino Board as HP-IL device?
Quote:Well, installing the PIL-Box firmware on the PIL-IO just means plug the existing PIL-Box uC on the PIL-IO board. Or, if you prefer, remove (or disconnect ) the USB module from the PIL-Box and add a connector for the serial lines and the supply. So almost no effort:-)
Ha, that's easy indeed. Wonderful!
Find all posts by this user
Quote this message in a reply
04-09-2014, 08:55 PM
Post: #9
RE: Arduino Board as HP-IL device?
Quote:Regarding the connection to the Raspberry: I just had a quick look, and it seems that there is no UART-type serial link nor RS232. Just USB. In that case you need the standard PIL-Box with USB.

Yes, a Linux distro is what's usually run on it.

There is a single UART (3.3v level) available on the GPIO pins 14 & 15, accessed as /dev/ttyAMA0 in the distro I'm using. No hardware handshaking though.
By default it's assigned to the system console, but that's easy to override. (I'm using it to drive a small serial LCD.)
You can also use a USB/serial cable - I haven't tried it, but others have reported success. Some of those support hardware handshake if you need it.
Find all posts by this user
Quote this message in a reply
04-10-2014, 01:10 PM
Post: #10
RE: Arduino Board as HP-IL device?
(04-10-2014 08:31 AM)Mike (Stgt) Wrote:  "Filbert" protocol?

Yes. Filbert protocol. Any question? :-)

J-F


Attached File(s) Thumbnail(s)
   
Visit this user's website Find all posts by this user
Quote this message in a reply
04-19-2014, 09:10 AM
Post: #11
RE: Arduino Board as HP-IL device?
[attachment=536]

Yes ist works :-)
- Arduino UNO
- SD Card Reader
- PIL Box / modified ILPer Software in "C"

Viele Grüsse
Tobie
Find all posts by this user
Quote this message in a reply
04-19-2014, 10:50 AM
Post: #12
RE: Arduino Board as HP-IL device?
(04-19-2014 09:10 AM)charger73 Wrote:  Yes ist works :-)
- Arduino UNO
- SD Card Reader
- PIL Box / modified ILPer Software in "C"
Great!!!
Do you have more details? Are you emulating with the SD card an IL drive? Any limitations?
Find all posts by this user
Quote this message in a reply
04-19-2014, 11:43 AM
Post: #13
RE: Arduino Board as HP-IL device?
Hi

Yes it emulates an IL Drive. DIR, WRPT, READP works.
But it is still in a experimental phase.

The Arduino board is directly connected with the PIL-Box (not PIL-IO)
(TXD->RX, RXD->TX, +5V->+5V and GND->GND) - not USB!
With simple "Serial" commands you can read an manage all IL frames.

I have to exchange the Arduino Uno Board, with the bigger one (Mega) - because of internal memory problems (SRAM is to small for 2x256Byte drive buffers and the SD Library, because of that, it is a little bit buggy.) http://arduino.cc/de/Main/ArduinoBoardMega

At the moment the only limitation is, there is only one LIF file (640kb) per SD Card.
But the Arduino can be extended with a LCD with menu keys for choosing the current LIF file, for example. Or perhaps i can do it with a special HPIL command...

I feel, its faster then the PC version.
I will still work on it and i will post any news and the sources here.

Best regards
Tobie
Find all posts by this user
Quote this message in a reply
04-19-2014, 01:17 PM
Post: #14
RE: Arduino Board as HP-IL device?
(04-19-2014 11:43 AM)charger73 Wrote:  At the moment the only limitation is, there is only one LIF file (640kb) per SD Card.
But the Arduino can be extended with a LCD with menu keys for choosing the current LIF file, for example. Or perhaps i can do it with a special HPIL command...
You could implement a virtual media switching mechanism. As default the first (or most recently chosen) LIF container is the active one. The command set could be like this:
  • EJECT - disconnects the current medium (LIF container)
  • SEEKMD n - Selects medium n (n in X register)
  • SEEKMDA - Selects medium by Alpha name
  • NEXTMD - Selects the next medium in queue
  • PREVMD - Selects the previous medium in queue
There could also be some housekeeping functions, like checking SD card free space.

Best Regards

-- Ray
Find all posts by this user
Quote this message in a reply
04-20-2014, 07:49 PM
Post: #15
RE: Arduino Board as HP-IL device?
(04-19-2014 09:10 AM)charger73 Wrote:  Yes ist works :-)
- Arduino UNO
- SD Card Reader
- PIL Box / modified ILPer Software in "C"

Great idea, keep on the good work, and please keep us posted! Thank you :-)
Find all posts by this user
Quote this message in a reply
05-14-2014, 05:30 PM
Post: #16
RE: Arduino Board as HP-IL device?
Hi all

Finally here is a stable “sketch” version for the Arduino Mega -> “IL Drive Emulator”

The transfer speed is around 1050 Byte/s with a HP71. (Or around 700 Byte/s with a HP75)

Other goodie :-)
It’s possible to change dynamically the current lif/dat file on the sd card. You just have to send this IL commands:
“UNL LAD01 DDL0B UNL” on a IL controller.

For example with a HP71: “: “SEND UNL LISTEN 1 DDL 11 UNL” – this will take the next file in the directory. So, your SD card can be loaded with hundreds of LIF files.

This all with a standalone, batteries driven system..

Please see the attached source code and the schematic plan for this little project.

This makes a lot of fun, you have to try it :-)

Best regards

Tobie
Find all posts by this user
Quote this message in a reply
05-14-2014, 06:00 PM
Post: #17
RE: Arduino Board as HP-IL device?
Wow,

I think I will actually try this myself!

Then Joe can send me all his LIF programs on a single SD CARD FOR MY 71!!!!

Thanks for your efforts.
Find all posts by this user
Quote this message in a reply
05-14-2014, 08:05 PM
Post: #18
RE: Arduino Board as HP-IL device?
(05-14-2014 05:30 PM)charger73 Wrote:  Finally here is a stable “sketch” version for the Arduino Mega -> “IL Drive Emulator”

The transfer speed is around 1050 Byte/s with a HP71. (Or around 700 Byte/s with a HP75)

Other goodie :-)
It’s possible to change dynamically the current lif/dat file on the sd card. You just have to send this IL commands:
“UNL LAD01 DDL0B UNL” on a IL controller.

For example with a HP71: “: “SEND UNL LISTEN 1 DDL 11 UNL” – this will take the next file in the directory. So, your SD card can be loaded with hundreds of LIF files.

This all with a standalone, batteries driven system..
This is really fantastic:-)

Any info on the power consumption of that setup?

Cheers

-- Ray
Find all posts by this user
Quote this message in a reply
05-28-2014, 08:25 PM
Post: #19
RE: Arduino Board as HP-IL device?
(04-02-2014 09:11 PM)Egan Ford Wrote:  Perhaps its time to see if we can print HP-IL connectors to spare cutting cables.


Hi Egan,

Did you follow up on that idea? I have been haunted by the same idea:

http://www.hpmuseum.org/forum/thread-1430.html

Let us know, if you found out something new!

Thank you,

Andreas
Find all posts by this user
Quote this message in a reply
06-27-2014, 09:11 PM
Post: #20
RE: Arduino Board as HP-IL device?
(04-19-2014 09:10 AM)charger73 Wrote:  [attachment=536]

Yes ist works :-)
- Arduino UNO
- SD Card Reader
- PIL Box / modified ILPer Software in "C"

Viele Grüsse
Tobie

(05-14-2014 05:30 PM)charger73 Wrote:  Hi all

Finally here is a stable “sketch” version for the Arduino Mega -> “IL Drive Emulator”

The transfer speed is around 1050 Byte/s with a HP71. (Or around 700 Byte/s with a HP75)

Other goodie :-)
It’s possible to change dynamically the current lif/dat file on the sd card. You just have to send this IL commands:
“UNL LAD01 DDL0B UNL” on a IL controller.

For example with a HP71: “: “SEND UNL LISTEN 1 DDL 11 UNL” – this will take the next file in the directory. So, your SD card can be loaded with hundreds of LIF files.

This all with a standalone, batteries driven system..

Please see the attached source code and the schematic plan for this little project.

This makes a lot of fun, you have to try it :-)

Best regards

Tobie
It seems that the pictures and attachments have disappeared. Does anybody have a coy of the pictures, schematics and Arduino sketch?
Find all posts by this user
Quote this message in a reply
Post Reply 




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