Re: HPIB bus commands

From: William Levak (wlevak_at_cyberspace.org)
Date: 2004-04-14 22:46:01

On Wed, 14 Apr 2004, Nicolas Welte wrote:

> Hi,
> 
> I think I made a mistake when I said that the secondary address send code can 
> be used to send GPIB commands. It's clear that they are send instead of a 
> primary address, otherwise they could not work with all devices.
> 
> Larry Mollica wrote:
> >>That would be 0x3f, or UNLISTEN.  There's a special ROM entry for sending
> >>that
> >>command.
> > 
> > 
> > Ok, so that's not something exclusive to HP instruments as I assumed. Is that
> > regularly sent by the PET, maybe when a IEEE488 file is CLOSEd in basic?
> 
> Yes, 0x3f is sent very often, it must also be sent after e.g. PRINT# or OPEN 
> or LOAD with a filename. The CBM devices seem to use this UNLSN command as a 
> sign that a command has been submitted.
> 
> I don't think 0x3f is used by your device as a "goto local" command. In my 
> IEEE488 help file for the National Instruments adaptor card in my PC, it's 
> also listed as UNLSN. This is a standard for all HPIB/GPIB/IEEE488 devices. 
> Otherwise it wouldn't be possible at all to have a PET talk to a HPIB 
> peripheral or a HPIB controller to a PET peripheral.
> 
> In my command reference, the commands 0x01 (GTL, probably means "goto 
> local"), and 0x11 (LLO, probably "local lock out") seem to be related to your 
> problem.
> 
> You can make use of the NTALK/NLISTN code in the PET ROM. In my series 8000 
> ROM disassembly book it starts at $f0d2 (ntalk) or $f0d5 (nlistn), which 
> preload $20 or $40 for the talk or listen commands, which is then pushed to 
> the stack. If you enter the code later with $00 in the accumulator or even 
> later with $00 already on the stack, you can send any byte to the bus. 
> (question to others: anyone knows how to do either thing easily on the PET?). 
> Later in the routine, the current primary address from $d4 is ORed with the 
> value on the stack and then put onto the bus as a command. All the 
> handshaking is also done here, so I think this is the best option you'll get. 
> If everything fails, I can give you a very small asm program that does 
> nothing else than call this ROM routine with the proper settings (It only 
> does: LDA $00: JMP $F0D7), and you POKE your command byte to $d4 and SYS to 
> this code.


From the PET Personal Computer Guide:

2.0    4.0
F0B6   F0D2   Send talk with attention
F0BA   F0D6   send listen with attention
F0BC   FOD7   send IEEE command character
FOE4   FOFF   wait for DAV low
F103   F11E   wait for NRFD to become low
F112   F12D   IEEE status
F11D   F138   set DAV high
F128   F143   send secondary address with listen
FI2D   F148   channel test - release ATN
F164   F193   send secondary address with talk
F169   F198   release ATN after talk
F16F   F19E   handshake character out
---    F1AE   untalk
F183   F1B6   unlisten
F18C   F1C0   handshake byte in
                                


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.