Model 2461 Interactive SourceMeter® Instrument Reference Manual
Section 8: TSP command reference
2461-901-01 A/November 2015
8-51
Details
You can use this command to place each digital I/O line into one of the following modes:
•
Digital open-drain, output, or input
•
Trigger open-drain, output, or input
•
Trigger synchronous master or acceptor
A digital line allows direct control of the digital I/O lines by writing a bit pattern to the lines. A trigger
line uses the digital I/O lines to detect triggers.
The following settings of
lineMode
set the line for direct control as a digital line:
•
digio.MODE_DIGITAL_IN
: The instrument automatically detects externally generated logic
levels. You can read an input line, but you cannot write to it.
•
digio.MODE_DIGITAL_OUT
: You can set the line as logic high (+5 V) or as logic low (0 V). The
default level is logic low (0 V). When the instrument is in output mode, the line is actively driven
high or low.
•
digio.MODE_DIGITAL_OPEN_DRAIN
: Configures the line to be an open-drain signal. The line
can serve as an input, an output or both. When a digital I/O line is used as an input in open-drain
mode, you must write a
1
to it.
The following settings of
lineMode
set the line as a trigger line:
•
digio.MODE_TRIGGER_IN
: The line automatically responds to and detects externally generated
triggers. It detects falling-edge, rising-edge, or either-edge triggers as input. This line state uses
the edge setting specified by the
trigger.digin[
N
].edge
attribute.
•
digio.MODE_TRIGGER_OUT
: The line is automatically set high or low depending on the output
logic setting. Use the negative logic setting when you want to generate a falling edge trigger and
use the positive logic setting when you want to generate a rising edge trigger.
•
digio.MODE_TRIGGER_OPEN_DRAIN
: Configures the line to be an open-drain signal. You can
use the line to detect input triggers or generate output triggers. This line state uses the edge
setting specified by the
trigger.digin[
N
].edge
attribute.
When the line is set as a synchronous acceptor, the line detects the falling-edge input triggers and
automatically latches and drives the trigger line low. Asserting an output trigger releases the latched
line.
When the line is set as a synchronous master, the line detects rising-edge triggers as input. For
output, the line asserts a TTL-low pulse.
Example
digio.line[1].mode = digio.MODE_TRIGGER_OUT
Set digital I/O line 1 to be an output trigger
line.
Also see
(on page 3-89)
Digital I/O port configuration
(on page 3-87)
(on page 8-242)