Keithley IE-488 User Manual

I E-488
Keithley MetraByte Corporation
*****
IE-488 Manual
Part Number: 24820
Revision A
Copyright @ 1984
KEITHLEY METAASYTEIASYSTIDAC
440 Myles Standish Boulevard
Taunton. Massachusetts 02780
Telephone 508/880-3000
FAX 508/880-0179
WARRANTY INFORMATION
All products manufactured by Keithley MetraByte are warranted against defective materials
and worksmanship for a period of one year from the date of delivery to the original purchaser. Any product that is found to be defective wlthin the warranty period will. at the option of Keithley MetraByte, be repaired or replaced. This warranty does not apply to
products damaged by improper use.
WARNING Keithley MetraByte assumes no liability for damages consequent to the u8e of this product. This product is not designed with components of a
level
of
reliability suitable for use in life support or crltical applications.
Information furnished by Keithley MetraEiyte is believed to be accurate and reliable. However, the Keithley MetraByte Corporation assumes no responsibility for the use of such information nor for any infringements of patents or other rights of third parties that may result from its use.
No license is granted by implication or otherwise under any patent
rights of Keithley MetraByte Corporation.
Keithley MetraByte/Asyst/DAC
is also referred to here-in as Keith&
MetmByte.
BasicTM
is a trademark of Dartmouth College.
IBM@ is a registered trademark of International Business Machines Corporation.
PC, XT. AT, PS/2.
and
Micro Channel Architecture@
(MCA) are trademarks of
International Business Machines Corporation.
Microsoft@
is a registered trademark of Microsoft Corporation.
Turbo C@ is a registered trademark of Borland International.
TABLE OF CONTENTS
CHAPTER 1
1.0 IEEE-488 GENERAL DESCRIPTION
1.1 IEEE-488 SYSTEM BUS OPERATIONS
CHAPTER 2
2.0 HARDWARE INSTALLATION
CHAPTER 3
3.0 MODES OF OPERATION
3.1 IMAGE SPECIFIERS
3.2 IMAGE TERMINATORS
3.3 FLAG RETURN CODES
CHAPTER 4
4.0 USER COMMANDS
ABORT
15
CLEAR
16
CONFIG
17
ENTER
18
EOI
19
LOCAL
20
LOCKOUT
21
OUTPUT
22
PARPOL
23
PASCTL
24
PPCONF
25
PPUNCF
26
REMOTE
27
REQUEST
28
RXCTL
29
STATUS
30
SYSCON
31
TRIGGER
32
3
4
9 11
12 13
14
Page 1
TABLE OF CONTENTS
CHAPTER 5
5.0 8086/8088 ASSEMBLY LANGUAGE CALL FORMAT
5.1 ROM/RAM MEMORY MAP
5.2 STACK SEGMENT MAP
5.3 RETURN FLAG CODES
APPENDIX A
DMA (Direct Memory Access) DATA TRANSFERS 36
APPENDIX B
RUNNING COMPILED PROGRAMS 38
APPENDIX C
MAIN IEEE488 (GPIB) BUS CONNECTIONS
40
APPENDIX D
C88-01 CONNECTOR CABLE 41
APPENDIX E
INSTALLING IE-488 BOARD # 2
42
APPENDIX F
EXAMPLE OF PROGRAMMING 43 REFERENCES
46
33 35 35 35
Page 2
GPIB IEEE488 MANUAL
1.0 GPIB IEEE488 INTERFACE CARD GENERAL DESCRIPTION MetraByte's IE-488 General
Interface (GPIB) I/O expansion board for the IBM-PC computer is designed to plug directly into one I/O slot inside the IBM-PC.The IE-488 has a built in 12 KbyteROM interpreter which handles all the required initialization and
protocol functions required to use the IEEE488 Interface. No disk
files with driver routines are needed and the interpreter allows
all commands to be programmed in conventional high level IEEE488 command syntax e.g. REMOTE, ENTER etc.
The IE-488 complies with the IEEE November 1978 standard. The Interpreter is a relocatable 16 Kbyte block of code which may be entered via a BASIC CALL statement or via DOS interrupt commands using assembly language
programming. All commands are string coded for ease of use. The GPIB will handle up to 14 other talker/listener devices. The controller maybe the IBM or any other of the 14 devices, any one
of which control may also be transferred to or from. The IE488 interpreter includes a group of subroutines which may be used to to condition the data before data transfer when using assembly
language programs.
The IE488 interpreter is capable of implementing all twelve of the interface messages which are as follows:-
1. The Data Message
----------------
The actual data information
sent from the talker device to one or more listening devices on the GPIB.
2.
The Trigger Message
-------------
This messaoe causes the
listener
device(s) to perform a device dependent action when addressed.
3.
TheClear Message
---------------
4. The Remote Message --------------
5. The Local Message ---------------
6. The Local Lockout Message -------
This
message
causes the addressed device or all the devices on the GBIB to return to their
predefined
state. Causes the addressed device
or devices to switch from front panel to remote prog­ram control.
Causes
the Remote Message
to be cleared
from the
addressed device(s). Prevents an
operator from manually returning to local via front panel controls.
Page 3
GPIB IEEE488 MANUAL
7. Clear Lockout (Local Message) ---
8. Service Request Message
- - - - - - - - -
9. Status Byte Message
-------------
10. The Status Bit Message ---------
11. The Pass Control Message
-------
12. The Abort Message --------------
GENERAL
Clears
all
devices on the
GPIB and sets in local mode. Any device
may
send this at
any
time
to request service
from the controller. This
is
cleared
by sending the
device's Status Byte Msg.
if
the device no
longer
requires service. A data byte that represents
the
status of
one device
on the bus.
Bit 6 is set if the device sent a Service Request Message,
and the
remaining
bits are unique,
to the selected device.
A byte which represents the
operational conditions of a
group
of devices on the
bus.
Each bit represents a device on the bus. This is typical response to a Para-
llel Poll operation.
This allows transfer of the
bus
management
duties to
another device on the bus. The
System
controller takes
unconditional
control of the bus from the active controller.
The
message
terminates communications
with
the bus
and sends a
Clear All
message.
********* IEEE488 GPIB FUNCTION CLASSIFICATION TABLE ************
T6
-- Basic Talker, Serial Poll, Unaddressed if MLA
TEO
-- No extended talker function
II4
-- Basic Listener, Unaddressed if MTA
LEO
-- No extended listener function
SHl
-- Complete Source Handshake capability
AH1
-- Complete Acceptor Handshake capability
SRl
-- Complete Service Request capability
PPl
-- Parallel Poll Remote configuration capability
RLl
-- Complete Remote / Local capability
DC1
-- Complete
Device
Clear capability
DTl
-- Complete Device Trigger capability
Cl,C2,C3,C4,CS - CONTROLLER states
Page 4
GPIB IEEE488 MANUAL
1.1
IEEE488 SYSTEM BUS OPERATIONS
The sequence of actions for all data transfer commands on the bus is as follows:
OUTPUT
INPUT
1. IBM-PC Talk Address
1. Device Talk Address
2. UNLISTEN 2. UNLISTEN
3. Device Listen Address
3.
IBM-PC Listen Address
After the transfer of data is complete the bus remains in the
last programmed condition.
SECONDARY COHMANDS
When communicating to/from devices which use secondary addressing,
the devices extended address is specified by
separating the primary address with a ".11 (period). The use of extended addressing or secondary commands (maximum level of five) complies with the 1978 IEEE488 standard. The bus sequence for secondary or extended addressing is as follows:
1.
IBM-PC Talk Address
2. Unlisten
3. Device Primary Address
4. Secondary Commands/Address
5. Data
NOT IN CONTROL ADDRESSING
When the IBM-PC is not the active controller on the bus, no other devices may be addressed by the IBM-PC (all controller commands). The IBM-PC may still transfer data as a talker/listener if setup by the controller in charge.
During an ENTER command the IBM-PC waits until the active talker transmits the data if the IBM-PC was addressed by the talker/listener. If the address codes are not satisfied,
ah9000 will be returned in the FLG% variable. This allows the user to perform a program wait loop for maximum efficiency in error handling. The OUTPUT statement waits until the controller addresses the IBM-PC to talk and the ENTER command waits until the controller addresses the IBM-PC to listen. The
IBM-PC may assume control if the controller in charge sends the Take Control Message after it programs the IBM-PC as a Talker. During a DMA transfer the IBM will wait until addressed before data is transferred. A time out code is returned if the data is not accepted by the talker/listener.
The programmer may use this
return code for a time out loop also.
Page 5
GPIB IEEE488 MANUAL
GENERAL
2.0 HARDWARE INSTALLATION
TheIE488 board requires one slot in the IBM-PC and 16
consecutive address locations in I/O space.
The board also requires a free 16 K-byte block of memory for the on board 12K­byte ROM interpreter and 4K-byte Static Ram. Some I/O address
locations will be occupied by internal I/O and your other
peripheral cards,
so to provide flexibility in avoiding conflict
with thesedevices the IE488 I/O address can be set by the Base
Address D.I.P.
switch to be on any 16 bit boundary in the IBM ­PC decoded I/O space. This also makes possible the use of a second IE488 interface board in the same computer. The I/O map for IBM's standard Internal/External peripherals is listed on page 2-23 of the
"IBM Technical Reference Manual".
Usually, a good choice is to put the IE488 at base address &H300 or &H310 (Decimal 768,784). (Note if you are using the IBM prototype interface board,
it uses the hex 300 -3lF address space
and would be in conflict). There are three groups of switches on the IE488 interface card.
The Base Address switch is located on the top left corner and marked BASE ADDRESS. The switch settings are listed as follows:
DEVICE I/O ADDRESS BITS
(msb)
(lsb)
A9 AS A7 A6 A5 A4
Example shows
address bits 11 0 0 0 0
ADDRESS = &H300
switch pos.
dn dn up up up up
A switch in the up (on) position corresponds to a ZERO (0) in the address bit. Similarly,
a ONE (1) is set in the address bit when the switch is in the down (off) position. The example switch setting above shows the address switch selecting &H300 (768 decimal) for the Base I/O Address.
NO CRECK IS MADE ON THE BASE ADDRESS WHEN INITIALIZED, BE SURE THAT THE BASE ADDRESS SELECTED DOES NOT CONFLICT WITH ANY OTHER PERIPHERALS.
The next switch is the MEMORY ADDRESS switch. This switch selects the 16 Kbyte block of memory on an even 16 Kbyte boundary. The addressing of the switches corresponds to the absolute20bit address location in 16 Kbyte increments. The MEMORY ADDRESS
switch is located above the gold edge connector.
MEMORY ADDRESS BIT
(msb)
A19 A18 Al7 Al6 Al5
address
bits 1 1
0 0 0
s
(lsb)
Al4
Example for
0
MEMORY ADDRESS
Page 6
GPIB IEEE488 MANUAL INSTALLATION
switch settings dn dn up up up up
= &HCOOOO
Refer to Section 2 of the IBM Technical Reference Manual for a complete
system memory
map layout. The address chosen in the above diagram is COO00 hex which is in the 192 Kbyte expansion area after the display buffers.
This is usually a clear area on
most
IBM P.C.'s.
Make a note of the MEMORY ADDRESS and the BASE
ADDRESS of the boards for initialization.
*****************et WARNING *******t*t****ttt*tt
NO CHECK IS MADE ON THE MEMORY ADDRESS, MAKE SURE THERE IS NO OTHER MEMORY ASSIGNED TO THE SELECTED ADDRESS.
The next switch setting is for the interrupt vectors and DMA channel selection.
The IBM-PC has eight (8) interrupt vector
levels and two levels (0 & 1) are not accessible since they are
used by the operating
system.
The remaining 6
vectors are
available to the user.
The IBM-PC interrupt vector map is as shown below with the standard assignments of function made by IBM.
LEVEL
VECTOR
0 1
---------------
---------------
3”
-----------____
---------------
4
---------------
5
---------------
6
---------------
7
---------------
FUNCTION [TIMER - SYSTEM ONLY) [KEYBOARD - SYSTEM ONLY)
USER OR LPT2: COMM2: ADAPTER COMMl: ADAPTER FIXED DISK OR LPT3: FLOPPY DISKETTE DRIVES PRINTER #l (LPTl:)
The INTERRUPT LEVEL & DMA selector switch is located in the bottom center of the board. The switch is marked INT (1 2 4) and is set as follows:-
INTERRUPT
0 1 2 3 4 5 6 7
LEVEL
SW(2)-1
2 2 :: d":
SW(3)-2
UP ::
dn up
a": dn
SW(4)-4
up
RESERVED
UP
RESERVED
UP UP
dn
dn
dn dn
The standard switch setting is vector level 5 and is shown in
bold print. It is the users responsibility to select an interrupt
level that does not conflict with the operating
system
hardware.
If the
system
is using a spooler for the printer then Interrupt Level 7 will be in use. Note that the interrupts are only used during DMAtransfers, therefore if DMA is notusedthe setting is
irrelevant.
Page 7
GPIB IEEE488 MANUAL
INSTALLATION
The last switch setting is the selected DMA channel. The switch is part of the bank of four switches used for the interrupts. The switch is marked DMA (1 - 3), up is Channel 3, down is channel 1.
In IBM-PC's equipped with floppy disk(s) only, DMA level 3 should
be used. Hard disk equipped machines (XT models) force the user
to utilize DMA level 1.
This is somewhat restrictive, since due
to the hardware design of the IBM-PC,
DMA level 1 page register
is the
same as
DMA
level 0 (memory
refresh). For
more
information
see Appendix A. The board is shipped with the following switch settings.
MEMORY ADDRESS = COO00 hex
BASE ADDRESS
= 300 hex
INTERRUPT # = 5
DMA CHANNEL = 3
Having made the switch settings, you can now install the IE-488
board.
First
remove
the board from its protective eIectrostatic
packaging.
It is a good precaution to discharge any electrostatic
charge you
may
have accumulated by touching the
metal
frame of
your computer (you should have it grounded for safety). Next, if
you have not already done so, TURNOPPTHEPOWERonyour computer
and take off the case (see IBM
"Guide to Operations" for
reference).
Remove a vacant back plate by undoing the screw at the top and press the card guide supplied with the IE-488 board on the opposite side of the case
(some
models
may not
require
this). Slip the IE-488 board in and secure the backplate. That
completes
the hardware installation.
One
more
precaution concerning storage and handling of the
IE-488 interface board.
MetraByte recommends that you retain the
special
electrostatically shielded package and use it for protective storage of the board if for any reason it is removed from your computer.
Page 8
GPIB IEEE488 MANUAL COMMAND FORMAT
3.0 MODES OF OPERATION
In the interests of conciseness for the more experienced programmer and user, this section has been written as a reference and initially may be difficult to understand. If this is the case, refer to Appendix F where a step by step real programming example read together with this
section provides an easier
introduction.
All modes of operation are determined by an
ASCII
STRING
in a command (COMMANDS or CMD$) referenced within a CALL
statement. The CALL statement format is:
XXX CALL IE488 ( COMMAND$, varf$I(%), FLAG%, BASADR% 1
where:
COWHANDS
- is the COMMAND
including
device addresses or
secondary commands and
[ image terminators 1. This
is always a STRINGandisdecodedbythe CommandLine
Interpreter in the IE-488 firmware (ROM). The COMMAND is separated from the operands (devices etc.) by one or more SPACES,
any other delimiters will cause a SYNTAX error in command line. The separator for devices is always the comma "," andsecondary address is always a period ".". The IMAGE string is identified by brackets "[I". The Command
Line
Interpreter is relatively tolerant of syntax error identification and will send back the appropriate error code to isolate the error. The format is:-
CMD$ =
"COMMAND devl, dev2, . . . ..devn [image]"
The
[image]
specifier allows the user to specify the variable field operations for the beginning and end of the data transfer variable. The variable may be a variable name,
array identifier, numeric data value or a string. The user must match the image to the data type or an error will be generated in the
data transfer. No check is made in the match of the image to the variable type,
this is the responsibility of
the user.
The [image] codings are explained in
section 3.1 (IMAGE SPECIFIERS).
varC$l(%) - isthe data variable OUTPUT/INPUT to be transferred
from/to. Datais transferred
as specified by the image terminator/specifier. If the image specifier is not used the data is treated as an integer. The data may be of String or Integer type.
FLAG% ---
is the transfer status of the CALL statement. If an error occurs FLAG%
will
contain a
HEX
number
representing the error condition.
A set of error and
Page 9
GPIB IEEE488 MANUAL
COMMAND FORMAT
transfer message codes are generated at the completion of each CALL.
BASADR% -- is the address of the interface board being used.
BASADR% may be 0 or 1, or actual base address e.g. 768.
Page 10
Loading...
+ 36 hidden pages