DIRECTORY Rope; GPIB: DEFINITIONS = BEGIN StatusFlag: TYPE = { DAV, -- Data Valid NRFD, -- Not Ready For Data NDAC, -- NOT Data Accepted IFC, -- Interface Cleared SRQ, -- Service Request REN, -- Remote Enable EOI, -- End or Identify ATN -- Attention [switch Command/Data modes] }; maxWriteBuffer: NAT = 512+5; maxReadBuffer: NAT = 512+5; StatusVec: TYPE = ARRAY StatusFlag OF BOOL; SRQLabels: TYPE = ARRAY StatusFlag OF Rope.ROPE; goToLocal: CHAR = 001C; -- GTL selectedDeviceClear: CHAR = 004C; -- SDC parallelPollConfigure: CHAR = 005C; -- PPC groupExecuteTrigger: CHAR = 010C; -- GET takeControl: CHAR = 011C; -- TCT localLockout: CHAR = 021C; -- LLO devicesClear: CHAR = 024C; -- DCL parallelPollUnconfigure: CHAR = 025C; -- PPU serialPollEnable: CHAR = 030C; -- SPE serialPollDisable: CHAR = 031C; -- SPD parallelPollEnable: SecondaryCommand = 140C; -- PPE parallelPollDisable: SecondaryCommand = 160C; -- PPD ListenAddress: TYPE = CHAR [040C..077C]; UnListen: ListenAddress = 077C; TalkAddress: TYPE = CHAR [100C..137C]; UnTalk: TalkAddress = 137C; SecondaryCommand: TYPE = CHAR [100C..177C]; FORMAT: TYPE = {F0, F1, F2, F3, F4, F5}; PrimaryAddress: TYPE = CHAR [040C..137C]; DeviceAddr: TYPE = NAT [0..31); Terminator: TYPE = {CR, LF, EOI}; Command: PROC [sendMsg: Rope.ROPE]; DevicesClear: PROC; GoToLocal: PROC; GroupExecuteTrigger: PROC; InterfaceClear: PROC; LocalLockout: PROC; RemoteEnable: PROC; SelectedDeviceClear: PROC [device: DeviceAddr]; SelectedGoToLocal: PROC [device: DeviceAddr]; SelectedGroupEnableTrigger: PROC [device: DeviceAddr]; SelectedRemoteEnable: PROC [device: DeviceAddr]; ParallelPollConfigure: PROC [device: DeviceAddr]; ParallelPollUnconfigure: PROC; SelectedParallelPollConfigure: PROC [device: DeviceAddr]; SelectedParallelPollUnconfigure: PROC [device: DeviceAddr]; PollDevice: PROC [device: DeviceAddr, labels: SRQLabels]; ReadDevice: PROC [device: DeviceAddr, terminator: Terminator _ EOI] RETURNS [recvMsg: Rope.ROPE]; ReadOnInterrupt: PROC [device: DeviceAddr, recvMsg: Rope.ROPE, labels: SRQLabels]; SelectedReadSerialPoll: PROC [device: DeviceAddr] RETURNS [statusByte: CHAR]; ReadStatusByte: PROC [device: DeviceAddr] RETURNS [char: CHAR]; WriteDevice: PROC [device: DeviceAddr, sendMsg: Rope.ROPE]; WriteDeviceBuffered: PROC [device: DeviceAddr, sendMsg: Rope.ROPE, hold: BOOL]; InitializeController: PROC RETURNS [open: BOOL]; FinalizeController: PROC; SRQAsserted: PROC RETURNS [asserted: BOOL]; WriteDeviceInitial: PROC [device: DeviceAddr, sendMsg: Rope.ROPE]; WriteDeviceContinued: PROC [device: DeviceAddr, sendMsg: Rope.ROPE, last: BOOL]; WriteDeviceBlock: UNSAFE PROC [device: DeviceAddr, lp: LONG POINTER TO WORD, -- For Lupine -- quadWordCnt: CARDINAL, last: BOOL]; WriteDMABlock: UNSAFE PROC [device: DeviceAddr, multiBusAddress: LONG POINTER TO WORD, -- For Lupine -- byteCnt: CARDINAL, last: BOOL]; CheckDMADone: PROC RETURNS [BOOL]; END. `GPIB.mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reserved. Last edited by Neil Gunther, November 8, 1985 1:57:25 pm PST Tim Diebert: March 25, 1986 10:44:41 am PST Last Edited by: Gasbarro March 4, 1986 10:25:28 am PST This interface defines the IEEE 488 General Purpose Interface Bus (GPIB) standard for asynchronous byte serial bit parallel interfacing to instrumentation. It contains all the standard commands, both universal and selected, and data transfer PROC's. To keep machine-dependent applications organized, this PUBLIC interface is EXPORTED by the appropriate driver-level implementation which must be bound into the client's configuration. IEEE 488 Technical Parameters: o Maximum transmission length = 20 meters/bus; 2m/device; Star or Linear network. o Maximum number of devices/bus = 15; 1 talker/14 listeners. o Maximum data rate = 1Mbps for short paths; ~300 Kbps typical; device limited. o Signals: 8 data/8 control simultaneously active. o Data Transfer: byte serial bit parallel, asynchronous, with 3-wire handshake. o Only one controller may be active at once. The sytem controller is the master. For the formal bus specification see: IEEE Standard Digital Interface for Programmable Instrumentation, ANSI/IEEE Std 488-1978 and ANSI/IEEE Std 728-1982. Types and Constants Bus Status Command Group Listen/Talk Address Groups Procedures Universal commands (all devices whether addressed or not) Selected Device Commands (only those devices addressed) Explicit Polling Routines Read Specific Devices Write Specific Devices Uses a double buffer scheme to make RPC go faster. Set hold: TRUE on last packet of buffer to ensure syncronization with next command. Convenience Functions Printer Functions (see Tim Diebert) -- Sends the string without asserting EOI. -- Sends the string without the initial stuff. -- Sends the bytes pointed to by lp, the total bytes count must be a multiple of 8. -- Sends the bytes pointed to by multiBusAddress from the MultiBus Memory card in the busmaster. Indicates that the DMA transfer is complete and the controller is willing to start another. Κ˜codešœ ™ Kšœ Οmœ7™BKšœ<™