Data transfers, 9h. data transfers, Terminators – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 191

9H. Data Transfers
II. SOFTWARE GUIDES - 9. Driver488/SUB
II-176
Personal488 User’s Manual, Rev. 3.0
Terminators
Every transfer of data, between a program and Driver488, or between Driver488 and a bus device, must
have a definite end. This is a common requirement in most systems. For example, most printers do not
print a line until they receive the carriage return that ends that line. Similarly, a BASIC
Input
statement waits for the
key to be pressed before returning the entered data to the program.
The only time that some terminator is not required is when the number of characters that compose the
data is known in advance or is transferred along with the data. This is the case, for example, when
fixed-length records are read from a random access disk file.
Driver488 actually uses two terminators:
•
The data terminator (
Term
) for output to bus devices from Driver488.
•
The data terminator (
Term
) to input from bus device into Driver488.
TERM Terminators
The
Term
terminators delimit the end of strings transferred between Driver488 and bus devices. The
Term
output terminator marks the end of strings transferred from Driver488 to bus devices, and the
Term
input terminator marks the end of strings transferred into Driver488 from bus devices.
The
Term
terminators normally consist of one or two ASCII characters. The characters do not need to
be printable and, in fact, are usually special characters such as carriage return and line feed. Input and
output terminators need not be the same.
You can specify that no characters are to be used as
Term
terminators. If the
Term
output terminator is
set to NONE, then Driver488 does not append any characters to the data sent to the device. When the
Term
input terminator is set to NONE, Driver488 does not check for terminator characters in the
returned data.
The
Term
terminators can include the IEEE 488 bus end-or-identify (
EOI
) signal. The
EOI
signal,
when asserted during a character transfer, marks that character as the last of the transfer. This allows
the detection of the end of data regardless of which characters comprise the data. This feature is very
useful in binary data transfers which might contain any ASCII values from
0
to
255
.
To support the
EOI
signal, the
Term
input and output terminators can be composed of just
EOI
, one or
two characters, or one or two characters with
EOI
. If
EOI
is specified, it has a slightly different
meaning on input than on output.
When
EOI
alone is specified as the
Term
output terminator, the
EOI
bus signal is asserted during the
last data character transmitted. If
EOI
is specified with one or two characters, then
EOI
is asserted on
the last character. In this way,
EOI
is asserted on the last character transmitted to the bus device.
When
EOI
alone is specified as the
Term
input terminator, then all the characters received from the bus
device, including the one on which
EOI
was asserted are returned to the user’s program. When one or
9H. Data Transfers
For Driver488/SUB, W31, W95, & WNT
Topics
•
Terminators ................................................................................... II-175
TERM Terminators ..................................................................................... II-175
•
Data Input and Output................................................................ II-176
•
Asynchronous Transfers ............................................................. II-177