HP71B 82164A Help



#8

I'm trying to read the status registers of my 82164A HP-IL to RS232 interface from BASIC on the 71. On page 35 of the 82164A manual, I see a pseudo-code sequence of HP-IL messages to accomplish this:

Unlisten
Talk Address 3
Device Dependent Talker 0
Send Data
.. Data ..
EOT
Untalk

I've been experimenting with implementing that on my 71B, using the HP-IL interface manual. The best I can come up with is this:

  10 D=DEVADDR("%66")
20 LOCAL
30 SEND UNL MLA TALK D DDT 0
40 FOR I=1 TO 14 @ ENTER :LOOP USING "#,B";C0 @ DISP I @ NEXT I
50 SEND UNT

The motivation for this form of the code is that any attempt to read more than one byte at a time hangs with the T/R lite on the serial interface constantly lit. Consistent with that, the above code displays "1" and then hangs.

Can anyone suggest what I'm doing wrong?

Thanks,
Howard


#9

Unless I'm trying to send binary data, I usually just use "PRINTER IS" and then print to the serial interface.

Anyhow, the only thing I can think of that would explain it stalling on ouptut is if it is expecting hardware handshaking on the serial port. But perhaps someone else here actually has more 82164A experience than I have.


#10

Hi, Eric

The above code is trying to get a dump of the status registers from the interface. That shouldn't require any activity on the RS-232 side of the interface at all. Even so, I had that side configured to do hardware handshaking with the following code from JF's 82164 cable doc:

10 ! --- SETRS ---
20 D=DEVADDR(“%66”)
30 REMOTE
40 OUTPUT D;”LI5;C0”
50 LOCAL
60 END

That code turns off software flow control and disables DTR control. That leaves RTS/CTS handshaking on.

The code does behave differently when I attach a USB-Serial cable to the RS-232 side. With Hyperterminal running so that DISPLAY IS works, the code in my first post stops with a "DEVICE NOT READY" error in line 40. It displays "1" first, so it's the second iteration through the FOR loop that returns the error. That certainly sounds like a flow control issue of some sort. But turning off all hand shaking makes no difference. It's possible I'm not following the HP-IL protocol as to how to receive data after the DDT 0 command.

Regards,
Howard


#11

I have the FSI-164A which is not quite identical to the 82164. You may be trying to do something I haven't needed to up to now, but it seems like you're doing it the hard way. I have never had to address the registers directly, but use the commands instead, also letting the OS take care of the internals of HPIL protocol. A typical setup on mine mine look like:

10 RESTORE IO @ A=DEVADDR("RS232") @ REMOTE @ OUTPUT :A ;"C0;SBE;R0;R1;SL0" @ LOCAL

Garth

E-mail addr: wilsonmineszdslextremezcom (replace the z's with @ and . )


#12

Hi, Garth,

Yes, there are two ways to get and set the status registers. In addition to the REMOTE mode you demonstrate, there's the Device Dependent (Listener|Talker) method that takes place in LOCAL mode. I'm trying to get to know this interface better, so I was trying out the DDT method of dumping the registers. I think I'm probably missing pieces of the protocol, or else mixing the SEND and ENTER approaches is running afoul of how ENTER treats HP-IL.

I did finally have a look at Friedman's "Control the World with HP-IL". He has several interesting examples of practical 71B code addressing the 82164A. In particular, this sequence from page 263 shows an initialization of the interface with the DDL method:

20 A=DEVADDR("RS232")
30 SEND UNT UNL LISTEN A MTA DDL 0 DATA 0,0,0,0,0,0,0,14 UNT UNL
40 PRINTER IS :RS232


This is setting the registers, not reading their contents. But it's close to what I came up with. (I modified my code to do both UNT and UN after reading this - no help.) So I'm pretty sure the problem has to do with reading the bytes off HP-IL with ENTER. It's probably doing some loop maintenance itself, which could throw things for a .. er.. loop.

Regards,
Howard


#13

Hi Howard,

Yes, I think the problem is the multiple ENTER statements : each will probably send a SDA (send data), enter one byte, then send a NRD (Not Ready for Data).

A better way would be:

   5 DIM A$[14]  
10 D=DEVADDR("%66")
20 LOCAL
30 SEND UNL MLA TALK D DDT 0
40 ENTER :LOOP ;A$
50 SEND UNT

Without any guarantee, I didn't test it!

J-F


#14

Hi, JF,

Here's what I came up with that actually works:

10 OPTION BASE 1
20 DESTROY C$ @ DIM C$[14]
30 D=DEVADDR("%66")
40 LOCAL
50 SEND UNT UNL MLA TALK D DDT 0
60 ENTER :LOOP USING "#,14A";C$
70 SEND UNT
80 END

It doesn't work without the image because the 82164A is using EOT as a line separator, instead of a line feed. This code also works:

  10 OPTION BASE 1
20 DESTROY C$ @ DIM C$[14]
30 SFLAG -23
40 D=DEVADDR("%66")
50 LOCAL
60 SEND UNT UNL MLA TALK D DDT 0
70 ENTER :LOOP ;C$
80 SEND UNT
90 END

System flag 23 sets the end of line character to EOT, which is what the 82164A uses.

Thanks for your help!

Regards,
Howard


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP71B Spy Radio Crypto Donald Ingram 2 647 10-14-2013, 10:51 AM
Last Post: Eric Smith
  HP71B to HP 41 Translator ROM Manual Michael Lopez 5 847 04-25-2013, 03:51 AM
Last Post: Mike (Stgt)
  Rather large missed opportunity - a pile of HP71B's Chris Smith 3 643 04-19-2013, 07:30 AM
Last Post: Chris Smith
  Has anyone else had problems with ebay member 'hp71b'? Dan Grelinger 6 911 01-26-2013, 09:33 AM
Last Post: aurelio
  Trouble with RS-232/HP-IL Interface (HP 82164A) Hans Holzach 9 1,197 01-08-2013, 01:52 AM
Last Post: Marcus von Cube, Germany
  Curious SINPLOT behavior on HP71B Christoph Giesselink 4 672 07-12-2012, 03:12 PM
Last Post: J-F Garnier
  New HP71B emulation (go71b) Olivier De Smet 9 1,181 06-26-2012, 10:25 AM
Last Post: Jerry Raia
  HP71B News?? John W Kercheval 19 1,773 05-11-2012, 03:52 PM
Last Post: aurelio
  Right, thanks to a typo, I am now proud owner of a HP71B Harald 22 1,865 05-10-2012, 11:34 PM
Last Post: Eddie W. Shore
  HP71B Maths Module John Abbott (S. Africa) 25 2,144 05-07-2012, 04:48 AM
Last Post: Valentin Albillo

Forum Jump: