
Multi Purpose I/O Lines
On-board I/O lines (X0, X1, X2, X3)
(c) Spectrum Instrumentation GmbH
125
Synchronous digital inputs
The cards of the M2p series allow a very detailed setup on how to optionally record synchronous digital channels along with analog acqui
-
sition. The SPC_DIGMODEx register allows the setup separately for every analog channel. The table below shows the related registers and
the values that correspond with the different possibilities. The mask and mode and mode values have to properly be combined. This is shown
in the example below the tables:
Each mask constant has to be bitwise AND combined with a source/mode constant, to define which digital source will be inserted at which
position of the analog sample. The SPC_DIGMODEx register defines then, what analog channel this is applied to.
The driver will automatically scale the analog samples prior to inserting the digital channels to keep the channel at the maximum possible
resolution.
Sample Format
Any channels that will not store any digital inputs within their samples still provide the full 16 bit resolution. :
* Any X-input can be used as a source for that digital channel, except X0, which is output only.
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 all the digital bits from the samples.
The digital source has to be properly set to input direction to be a valid digital source. Also the analog channel
into that the digital signals shall be routed to must be activated properly for acquisition as described in the
„Channel Selection“ passage.
Table 73: Spectrum API: digital input options registers
Register
Value
Direction
Description
SPC_DIGMODE0
47250
read/write
Set the digital input sources for channel 0.
SPC_DIGMODE1
47251
read/write
Set the digital input sources for channel 1.
SPC_DIGMODE2
47252
read/write
Set the digital input sources for channel 2.
SPC_DIGMODE3
47253
read/write
Set the digital input sources for channel 3.
SPC_DIGMODE4
47254
read/write
Set the digital input sources for channel 4.
SPC_DIGMODE5
47255
read/write
Set the digital input sources for channel 5.
SPC_DIGMODE6
47256
read/write
Set the digital input sources for channel 6.
SPC_DIGMODE7
47257
read/write
Set the digital input sources for channel 7.
SPCM_DIGMODE_OFF
00000000h
Disable acquisition of digital data for the masked analog bit (see masks below).
SPCM_DIGMODE_X1
294A5000h
Enable acquisition of multi-purpose input X1 for the masked analog bit (see masks below).
SPCM_DIGMODE_X2
318C6000h
Enable acquisition of multi-purpose input X2 for the masked analog bit (see masks below).
SPCM_DIGMODE_X3
39CE7000h
Enable acquisition of multi-purpose input X3 for the masked analog bit (see masks below).
DIGMODEMASK_BIT15
F8000000h
Enable acquisition of a digital source (sources see above) into bit15 of the analog sample.
DIGMODEMASK_BIT14
07C00000h
Enable acquisition of a digital source (sources see above) into bit14 of the analog sample.
DIGMODEMASK_BIT13
003E0000h
Enable acquisition of a digital source (sources see above) into bit13 of the analog sample.
Table 74: Spectrum API: data organization for different digital input option configurations
Standard Mode
1 digital input enabled
2 digital inputs enabled
3 digital inputs enabled
Data bit
16 bit
ADC resolution
15 bit
ADC resolution
14 bit
ADC resolution
13 bit
ADC resolution
D15
ADx Bit 15 (MSB)
Digital bit 0 (any X input)*
Digital bit 0 (any X input)*
Digital bit 0 (any X input)*
D14
ADx Bit 14
ADx Bit 15 (MSB)
Digital bit 1 (any X input)*
Digital bit 1 (any X input)*
D13
ADx Bit 13
ADx Bit 14
ADx Bit 15 (MSB)
Digital bit 2 (any X input)*
D12
ADx Bit 12
ADx Bit 13
ADx Bit 14
ADx Bit 15 (MSB)
D11
ADx Bit 11
ADx Bit 12
ADx Bit 13
ADx Bit 14
D10
ADx Bit 10
ADx Bit 11
ADx Bit 12
ADx Bit 13
D9
ADx Bit 9
ADx Bit 10
ADx Bit 11
ADx Bit 12
D8
ADx Bit 8
ADx Bit 9
ADx Bit 10
ADx Bit 11
D7
ADx Bit 7
ADx Bit 8
ADx Bit 9
ADx Bit 10
D6
ADx Bit 6
ADx Bit 7
ADx Bit 8
ADx Bit 9
D5
ADx Bit 5
ADx Bit 6
ADx Bit 7
ADx Bit 8
D4
ADx Bit 4
ADx Bit 5
ADx Bit 6
ADx Bit 7
D3
ADx Bit 3
ADx Bit 4
ADx Bit 5
ADx Bit 6
D2
ADx Bit 2
ADx Bit 3
ADx Bit 4
ADx Bit 5
D1
ADx Bit 1
ADx Bit 2
ADx Bit 3
ADx Bit 4
D0
ADx Bit 0 (LSB)
ADx Bit 1 (LSB)
ADx Bit 2 (LSB)
ADx Bit 3 (LSB)
Summary of Contents for M2p.59 Series
Page 190: ......