Chapter 2
18
Converting a Twos Complement Code to a Voltage
To convert a twos complement code into a voltage, use the following
formulas:
LSB = FSR
2
N
Code
Offset Binary
= Code
Twos Complement
XOR 2
N-1
Vin = Code
Offset Binary
* LSB + Offset
where,
• LSB is the least significant bit.
• FSR is the full-scale range. For the DT9820 Series, the full-scale
range is 5.0 V for twos complement coding.
• N is the input resolution (24 bits).
• Vin is the analog voltage.
• Code
OffsetBinary
is the raw count used by the software to represent
the voltage in offset binary notation.
• Code
Twos Complement
is the raw count used by the software to
represent the voltage in twos complement notation.
• Offset is the actual minus full-scale value. The minus full-scale
value is
−
2.5 V for twos complement coding.
For example, assume that you are using a DT9822 with a range of
±2.5 V. If the software returns a code of C00000h for the analog input
operation, determine the analog input voltage as follows:
LSB =
5.0
= 0.000000298023
16777216
Summary of Contents for DT9820 Series
Page 1: ...DT9820 Series UM 18221 B User s Manual...
Page 4: ......
Page 7: ...Contents vii Appendix B Connector Pin Assignments 81 Index 87...
Page 8: ...Contents viii...
Page 13: ...1 1 Overview Features 2 Supported Software 4 Accessories 6...
Page 40: ...Chapter 2 28...
Page 41: ...29 3 Supported Device Driver Capabilities...
Page 52: ...Chapter 3 40...
Page 69: ...57 5 Calibration Running the Calibration Utility 59 Calibrating the Analog Output Subsystem 60...
Page 74: ...Chapter 5 62...
Page 84: ...Chapter 6 72...
Page 85: ...73 A Specifications...
Page 93: ...81 B Connector Pin Assignments...
Page 98: ...Appendix B 86...
Page 106: ...Index 94...
Page 108: ......
Page 112: ...Data Translation Support Policy...