
Multi Purpose I/O Lines
On-board I/O lines (X0, X1, X2, X3)
(c) Spectrum Instrumentation GmbH
123
Multi Purpose I/O Lines
On-board I/O lines (X0, X1, X2, X3)
The cards of the M2p series and the related digitizerNETBOX and
generatorNETBOX products have four multi purpose lines. Three of
these are multi purpose I/O lines (X1, X2, X3) as well as one multi
purpose output (X0). These lines can be used for a wide variety of
functions to help the interconnection with external equipment. The
functionality of these multi purpose lines can be software pro
-
grammed and each of these lines can either be used for input
(X1, X2, X3 only) or output.
The multi purpose I/O lines may be used as status outputs such as
trigger output or internal arm/run as well as for asynchronous I/O to
control external equipment as well as additional digital input or out
-
put lines that are sampled or replayed synchronously with the analog
data. The three input lines can also be used as additional logic trig
-
ger inputs, as described in the external trigger chapter.
The multi purpose I/O lines are available on the front plate and labeled with X0 (line 0), X1 (line 1), X2 (line 2) and X3 (line 3). As default
these lines are switched off.
Please be careful when programming these lines as an output whilst maybe still being connected with an
external signal source, as that may damage components either on the external equipment or on the card
itself.
Programming the behavior
Each multi purpose I/O line can be individually programmed. Please check the available modes by reading the SPCM_X0_AVAILMODES,
SPCM_X1_AVAILMODES, SPCM_X2_AVAILMODES and SPCM_X3_AVAILMODES register first. The available modes may differ from card
to card and may be enhanced with new driver/firmware versions to come.
Table 72: Spectrum API: XIO lines and mode software registers with their available settings
Register
Value
Direction
Description
SPCM_X0_AVAILMODES
600300
read
Bitmask with all bits of the below mentioned modes showing the available modes for (X0)
SPCM_X1_AVAILMODES
600301
read
Bitmask with all bits of the below mentioned modes showing the available modes for (X1)
SPCM_X2_AVAILMODES
600302
read
Bitmask with all bits of the below mentioned modes showing the available modes for (X2)
SPCM_X3_AVAILMODES
600303
read
Bitmask with all bits of the below mentioned modes showing the available modes for (X3)
SPCM_X0_MODE
600200
read/write
Defines the mode for (X0). Only one mode selection is possible to be set at a time
SPCM_X1_MODE
600201
read/write
Defines the mode for (X1). Only one mode selection is possible to be set at a time
SPCM_X2_MODE
600202
read/write
Defines the mode for (X2). Only one mode selection is possible to be set at a time
SPCM_X3_MODE
600203
read/write
Defines the mode for (X3). Only one mode selection is possible to be set at a time
SPCM_XMODE_DISABLE
00000000h
No mode selected. Output is tristate (default setup)
SPCM_XMODE_ASYNCIN
00000001h
Connector is programmed for asynchronous input. Use SPCM_XX_ASYNCIO to read data asynchronous as shown in
the passage below.
SPCM_XMODE_ASYNCOUT
00000002h
Connector is programmed for asynchronous output. Use SPCM_XX_ASYNCIO to write data asynchronous as shown
in the passage below.
SPCM_XMODE_DIGIN
00000004h
A/D cards only:
Connector is programmed for synchronous digital input. For each analog channel, one digital channel X1/X2/X3 is
integrated into the ADC data stream. Depending on the ADC resolution of your card the resulting merged samples
can have different formats. Please check the „Sample format“ chapter and the following passage on „Synchronous
digital inputs“ for more details. Please note that automatic sign extension of analog data is ineffective as soon as one
digital input line is activated and the software must properly mask out the digital bits.
SPCM_XMODE_TRIGIN
00000010h
Connector is programmed as additional TTL trigger input. X1/X2/X3 are available as Ext1/Ext2/Ext3 trigger input.
Please be sure to also set the corresponding trigger OR/AND masks to use this trigger input for trigger detection.
SPCM_XMODE_DIGOUT
00000008h
D/A cards only:
Connector is programmed for synchronous digital output. Digital channels can be „included“ within the analog sam
-
ples and synchronously replayed along. Requires additional MODE bits to be set along with this flag, as explained
later on.
SPCM_XMODE_TRIGOUT
00000020h
Connector is programmed as trigger output and shows the trigger detection. The trigger output goes HIGH as soon as
the trigger is recognized. After end of acquisition it is LOW again. In Multiple Recording/Gated Sampling/ABA
mode it goes LOW after the acquisition of the current segment stops. In standard FIFO mode the trigger output is
HIGH until FIFO mode is stopped.
SPCM_XMODE_RUNSTATE
00000100h
Connector shows the current run state of the card. If acquisition/output is running the signal is HIGH. If card has
stopped the signal is LOW.
SPCM_XMODE_ARMSTATE
00000200h
Connector shows the current ARM state of the card. If the card is armed and ready to receive a trigger the signal is
HIGH. If the card isn’t running or the card is still acquiring pretrigger data or the trigger has already been detected,
the signal is LOW.
SPCM_XMODE_CONTOUTMARK
00002000h
D/A cards only:
Outputs a HIGH pulse as continuous marker signal for continuous replay mode. The marker signal length is ½ of the
programmed memory size.
SPCM_XMODE_SYSCLKOUT
00004000h
Output of internal FPGA system clock. The system clock is always an even division of the current sampling clock.
Image 64: overview block diagram of multi-purpose I/O lines
Содержание M2p.59 Series
Страница 190: ......