
92
(c) Spectrum Instrumentation GmbH
Sample format
Acquisition modes
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.
Register
Value
Direction
Description
SPC_MIINST_MAXADCVALUE
1126
read
Contains the decimal code (in LSB) of the ADC full scale value.
V
in
49 1000 mV
128
----------------------------------------------
382.81 mV
=
=
V
in
55
–
1000 mV
128
----------------------------------------------
429.69 mV
–
=
=
Summary of Contents for M2p.59 Series
Page 190: ......