HP-71B - Understanding HP-IL Protocol



#11

Well, I'll be pouring over the books this weekend, trying to learn the ins and outs of the HP-IL protocol, at the chip level. I want to understand this at the microprocessor level; not higher language communications like with BASIC.

I was wondering... if one connects two HP-71B together, one being the controller and the other being the device, could one write a program using the FORTH Assembler (on the device side), that could read the HP-IL controller chip directly, bypassing the OS handling of the controller? I assume that's possible and might be an interesting way to learn the HP-IL interface.

Are the hardware addresses, for the HP-IL controller chip, documented somewhere, for the HP-IL module. I wold like to write such a program, to dump and handle the protocol of data coming across the HP-IL, as an exercize in understanding this protocol?

Anyone know?

Edited: 31 May 2006, 2:50 p.m.


#12

The documentation of the protocol itself, from the physical layer to the meaning of every single protocol packet is documented in the book "The HP-IL System: An Introductory Guide to the Hewlett-Packard Interface Loop"...

The actual hardware involved is only briefly mentioned in the book and there's no mention to specific implementations.

#13

The 71's HPIL internal design specifications volumes 1 & 2 total 950 pages, and are available on CD 5 from this website. The Forth/assembler IMS/IDS, with 528 pages, is also on CD 5. The three volumes of the 71's hardware internal design spec.s are on CD 7.


#14

I have plenty of documentation on this, including "The HP-IL Interface Specification", the HP-71 HP-IL IDS (V1 and V2), and the actual controller chip specification "The HP-IL Integrated Circuit User's Manual", which was meant for hardware designers using HP-IL. It covers everything about the ILB3-0003, including all the register and bit level access, timing diagrams and state diagrams.

Like I said, I have a lot of reading to do this weekend. But I still wonder if an HP-71B program can access the controller chip, via program written with the FORTH Assembler, as well as specific register addresses for the controller.


Edited: 31 May 2006, 5:09 p.m.


#15

Quote:
I still wonder if an HP-71B program can access the controller chip, via program written with the FORTH Assembler, as well as specific register addresses for the controller.
Since assembly and Forth give you control down to the metal, the answer would have to be yes.
#16

The HP-71B does NOT have direct register access to the 1LB3-equivalent HP-IL control chip. The HP-IL module contains a microcontroller which interacts with the HP-71B's Saturn processor via a "mailbox" which is memory-mapped in the latter's address space. The HP-71B provides relatively high-level commands, rather than the equivalent of reading and writing the 1LB3 registers.

From a functional point of view this is a good thing; the microcontroller in the HP-IL module handles all of the low-level details without much interaction from the main processor. However, if your desire is to understand how to program the 1LB3, studying the HP-71 HP-IL module won't help. Your best bet for learning to use the 1LB3 directly would be the 82973A ISA to HP-IL inteface card or equivalent, and a PC old enough to have ISA slots. Note that the HP-supplied software for the 82973A will not work correctly on most PCs using a 386, 486, Pentium, etc. However, this is due to poor design of the HP software, not any hardware problems with the card, and the card is perfectly capable of operating in those computers if you write your own software.

At one time it appeared that HP might make their microcontroller with integrated HP-IL interface available to third parties, but that never happened. The chip is related to the controller chip in the Thinkjet printer (even in most of the non-HP-IL Thinkjet printers).

Apparently it was a home-grown 8-bit microcontroller. Back in the early 1980s it wasn't as easy to buy an off-the-shelf microprocessor core that could be licensed for an ASIC.

Anyhow, the most important thing to understand when developing for HP-IL is the behavior of the many state machines in the HP-IL Interface Specification. The Kane and Harper book is a good introduction but does not provide the level of technical detail neceessary to develop a fully compliant device.

Note also that the 1LB3 implements portions of some of the lower level state machines itself. IIRC, it is involved in the Driver, Receiver, Source Handshake, and Acceptor Handshake functions. Thus the software state machines for these functions have to be rather different than what's described in the HP-IL specification, since the chip and the software have to work together to meet that specification. Pages 3-9 through 3-12 give flowcharts for the required D, R, SH, and AH state machines, and page 3-8 gives an example of a main control loop that invokes each individual state machine in turn.

You will also find the HP application note "Firmware Design for HP-IL Devices" to be useful. It provides pseudocode for some of the functions an HP-IL device needs to implement. It's on MoHPC CD3.

When implementing an HP-IL device, there may be some temptation to just "wing it" and write ad-hoc message processing code rather than strictly implementing the state machines. I would strongly urge any HP-IL developer to avoid that temptation, as that path leads to non-compliant devices that do not interoperate consistently, and in which it is very difficult to fix bugs.


#17

Quote:
The HP-IL module contains a microcontroller which interacts with the HP-71B's Saturn processor via a "mailbox" which is memory-mapped in the latter's address space. The HP-71B provides relatively high-level commands, rather than the equivalent of reading and writing the 1LB3 registers.

From a functional point of view this is a good thing; the microcontroller in the HP-IL module handles all of the low-level details without much interaction from the main processor.


This might be a good thing, as you say. Is this "mailbox" interface fully documented somewhere? HP-71B HP-IL IDS perhaps? Is the electrical interface to the HP-IL module documented in one of these documents?

But, with regards to the HP-IL module, I'd like to be able to interface it with a processor different from the HP-71B processor. I would like to interface the HP-IL module to another system and give it the memory access it needs for the mailbox. If the processor in the HP-IL module handles all the HP-IL commmands, what I need to know is the interface of the HP-IL module so that I can give it access to a "mailbox" in my design. Then, I'd also need to know the protocol or content values in this "mailbox". What document is best for understanding that?

Is this "mailbox" simply memory that the HP-IL module can access apart from any control or interference by the 71B? If so, the interface and message protocol, to this mailbox, should be all I need to understand, for my application. I could use my other micro to access that "mailbox" and obtain data across the HP-IL interface. [/quote]I want to do both, actually. I have a source for these 1LB3 chips and I need to understand that as well.

I also have the HP Museum CD set and will start there and look through the documents for the electrical interface to the HP-IL module.

Upon first look, it appears that the HP-71B IDS and HP-IL IDS contain the interface information I need. [quote]However, if your desire is to understand how to program the 1LB3, studying the HP-71 HP-IL module won't help.

Edited: 31 May 2006, 8:14 p.m.


#18

Quote:
This might be a good thing, as you say. Is this "mailbox" interface fully documented somewhere? HP-71B HP-IL IDS perhaps?

Yes, that's where it is documented.

Quote:
what I need to know is the interface of the HP-IL module so that I can give it access to a "mailbox" in my design.

Standard Saturn bus interface, as documented in the HP-71B Hardware IDS. A four-bit data bus, a command/data select, and a strobe (clock). Addresses and data are transferred nibble serially.

Quote:
I want to do both, actually. I have a source for these 1LB3 chips and I need to understand that as well.

Unless you simply have too much time on your hands, I'd recommend only trying to do one or the other. Since you indicated that you have a supply of 1LB3 chips, I'd recommend learning how to use that, since in general they're much more readily available than the HP-71 HP-IL module, and the chip is arguably easier to interface from a hardware point of view (standard DIP, standard 8-bit bus interface).


#19

What I had planned to do was use the HP-IL module with an HP-71B to try and understand the HP-IL software protocol. That would require building no hardware.

Then, I'd build some hardware and use the ILB3 chip in the design and implement what I learned using the HP-IL module. But you may be right. It might just be easier to jump to step two.

Edited: 1 June 2006, 10:06 a.m.


#20

I was a beta tester for the 82166C component kit. I built an HP-IL card for the Apple II. The hardware was very simply, so it only took about an hour to design and a half day to wire up, and worked the first time. The software took months of spare-time effort, but was arguably the interesting and fun part of the project.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help understanding math.... cyrille de BrĂ©bisson 9 4,004 12-13-2013, 02:23 AM
Last Post: Didier Lachieze
  [HP-41][HP-71B][HP-75C/D][HP-IL] Found a mother-lode of programs on ftp.stak.tk rdj 2 1,736 11-26-2013, 05:31 PM
Last Post: rdj
  How to move lexfiles from PC to 71 w/o HP-IL? Joe Horn 9 3,375 10-18-2013, 03:50 PM
Last Post: Christoph Giesselink
  HP-71B Cursor Chirp aj04062 4 2,000 09-29-2013, 08:30 PM
Last Post: Geoff Quickfall
  Best way to test HP-71B RAM modules (the 32K/96K ones etc.)? Philippe Lasnier 4 2,471 09-25-2013, 09:54 AM
Last Post: Philippe Lasnier
  Hand Held Products RS232 to HP-IL aj04062 11 3,584 08-31-2013, 07:12 PM
Last Post: Paul Berger (Canada)
  HP IL over wifi ... (ILPer & go71b) Olivier De Smet 12 4,215 08-20-2013, 05:44 AM
Last Post: Olivier De Smet
  How do you print a 'data' file on the HP 71B to the HP 2225B thinkjet? Geoff Quickfall 3 1,710 08-18-2013, 04:32 PM
Last Post: Geoff Quickfall
  Virtual HP-IL Video Interface ILVideo the 2nd! Christoph Giesselink 3 1,697 08-15-2013, 06:49 PM
Last Post: Sylvain Cote
  HP-71b questions jerome ibanes 6 2,288 07-01-2013, 05:03 PM
Last Post: Namir

Forum Jump: