D - data output…… 50, D - data output, Caution – Measurement Computing Digital488/80A User Manual
Page 56

D - Data Output
DvalZ
Define data to be outputted, where
val =
data value, terminated by
Z
.
SYNTAX
Note:
In the Format
F4
mode, the
Z
terminator suffix is not used. In the Format
F5
mode, both the
D
command prefix and the
Z
terminator suffix are not used.
DESCRIPTION
The Data Output (
D
) command outputs up to 40 bits of data to the output ports on a selected channel. The number of
bits that can be sent with the Data Output command is limited by the number of bits programmed as outputs. For Data
Formats
F0
through
F3
, if the amount of data sent is less than the number of bits programmed as outputs, then the
least-significant bits contain the data sent, and the most-significant bits are cleared to logic 0. If a single port is
selected with the Port Select (
P
) command, only 8 bits may be sent with the Data Output (
D
) command. The Data
Strobe output of the selected channel is pulsed for approximately 50 microseconds after new data is output on the
selected ports of that channel.
For Data Formats
F0
through
F3
, data sent by the controller are contained within a
D
command prefix, and a
Z
terminator suffix. In Data Format
F4
(binary), the 5 bytes immediately following the
D
prefix are interpreted as data and
the
Z
suffix is not used. In Data Format
F5
(high-speed binary), all bytes received are treated as data and the prefix
and suffix are not used. For more information, refer to the Data Format (
F
) command.
CAUTION
Because the Configuration (C) command is used, the following programming
example(s) will not work properly if the HVCX1 option is installed with a conflicting
hardware configuration. To be safe, remove the HVCX1 board and replace it with the
jumper board to run the example(s).
EXAMPLE
PRINT#1,"CLEAR08"
Line 1: Reset the Digital488/80A.
PRINT#1,"OUTPUT08;C5P1G2R0X"
Line 2: Configure all 5 ports as output; select Port 1 only.
PRINT#1,"OUTPUT08;D55ZX"
Line 3: Send data 55 to Port 1.
PRINT#1,"ENTER08",
INPUT#2,A$
Line 5: Read data from Port 1.
PRINT A$
Line 6: Display shows:
55
PRINT#1,"OUTPUT08;P0X"
Line 7: Select all 5 ports to read.
PRINT#1,"OUTPUT08;D1234567890ZX"
Line 8: Send data to all 40 data lines (4 bits per character).
PRINT#1,"ENTER08",
INPUT#2,A$
Line 10: Read data from the Digital488/80A.
PRINT A$
Line 11: Display shows:
1234567890
PRINT#1,"OUTPUT08;P5D21ZX"
Line 12: Select Port 5 only; send data 21 to Port 5.
PRINT#1,"OUTPUT08;P0X"
Line 13: Select all 5 ports to read.
PRINT#1,"ENTER08",
INPUT#2,A$
Line 15: Read data from the Digital488/80A.
PRINT A$
Line 16: Display shows:
2134567890
50 Digital488/80A Commands
967695
Digital488/80A User's Manual