![Spectrum M2i.3010 Hardware Manual Download Page 153](http://html.mh-extra.com/html/spectrum/m2i-3010/m2i-3010_hardware-manual_1344389153.webp)
Option Digital Differential Inputs
Card Setup
(c) Spectrum GmbH
153
Converting ADC samples to voltage values
The Spectrum driver also contains a register that holds the value of the decimal value of the full scale representation of the installed ADC. This
value should be used when converting ADC values (in LSB) into real-world voltage values, because this register also automatically takes any
specialities into account, such as slightly reduced ADC resolution with reserved codes for gain/offset compensation.
In case of a board that uses an 8 bit ADC that provides the full ADC code (with-
out reserving any bits) the returned value would be 128. The the peak value for
a ±1.0 V input range would be 1.0 V (or 1000 mv).
A returned sample value of for e49 (decimal, two’s complement,
signed representation) would then convert to:
A returned sample value of for example -55 (decimal) would then convert to:
When converting samples that contain any additional data such as for example additional digital channels
or overrange bits, this extra information must be first masked out and a proper sign-extension must be per-
formed, before these values can be used as a signed two’s complement value for above formulas.
Card Setup
Trigger limitations
Due to the internal structure of the card there is a slight restriction on the available trigger sources compared to cards that do not have the
digital differential feature installed. The channel trigger modes are only available on channel0 and channel 2 respectively either in single-
ended or in differential mode. These are the channels that in differential mode sample the positive phase of the differential input signal. All
possible channel trigger modes and levels remain the same as compared to cards without the differential feature installed.
The trigger modes for the TTL trigger inputs remain the same compared to cards without installed digital differential feature.
Programming
The digital differential mode can be enabled seperately for every installed module by the following registers:
Enabling the digital differential mode either on one or on both modules, will allow the card to work in one of the following different combi-
nations:
In modes where the differential mode is enabled for one module only and the other module uses single-ended inputs, the data of the differential
channel is dublicated in the multiplexed data stream due to the internal structure of the card.
Register
Value
Direction
Description
SPC_MIINST_MAXADCVALUE
1126
read
Contains the decimal code (in LSB) of the ADC full scale value.
Register
Value
Direction
Description
SPC_DIFF0
30040
read/write
Set channel 0 to digital differential mode. Therefore samples of the single-ended inputs ch0 and ch1
are subtracted digitally.
SPC_DIFF2
30240
read/write
Set channel 2 to digital differential mode. Therefore samples of the single-ended inputs ch0 and ch1
are subtracted digitally.
Channel enable mask
available on
SPC_DIFF0
SPC_DIFF2
Ch0 data
Ch1 data
Ch2 data
Ch3 data
CHANNEL0
M2i.30x1 (-exp)
M2i.30x2 (-exp)
M2i.30x3 (-exp)
M2i.30x4 (-exp)
M2i.30x6 (-exp)
1
not used
DIFF (SE ch0 - SE ch1)
not used
not used
not used
CHANNEL2
M2i.30x3 (-exp)
M2i.30x4 (-exp)
M2i.30x6 (-exp)
not used
1
not used
not used
DIFF(SE ch2 - SE ch3)
not used
CHANNEL0 | CHANNEL2
M2i.30x3 (-exp)
M2i.30x4 (-exp)
M2i.30x6 (-exp)
1
1
DIFF (SE ch0 - SE ch1)
not used
DIFF (SE ch2 - SE ch3)
not used
CHANNEL0 | CHANNEL1 |
CHANNEL2 | CHANNEL3
M2i.30x3 (-exp)
M2i.30x4 (-exp)
M2i.30x6 (-exp)
1
0
DIFF (SE ch0 - SE ch1)
DIFF (SE ch0 - SE ch1)
SE channel 2
SE channel 3
CHANNEL0 | CHANNEL1 |
CHANNEL2 | CHANNEL3
M2i.30x3 (-exp)
M2i.30x4 (-exp)
M2i.30x6 (-exp)
0
1
SE channel 0
SE channel 1
DIFF (SE ch2 - SE ch3)
DIFF (SE ch2 - SE ch3)
V
in
49 1000 mV
128
----------------------------------------------
×
382.81 mV
=
=
V
in
55
–
1000 mV
128
----------------------------------------------
×
429.69 mV
–
=
=