Re: Got plenty of documentation Message #6 Posted by Eric Smith on 31 May 2006, 7:42 p.m., in response to message #4 by Mike
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.
|