ZIRCON-MM
User Manual v2.11 © 2002 Diamond Systems Corporation P. 16
12. ANALOG INPUT FORMULAS
Zircon-MM uses an 8-bit A/D converter to read analog inputs. The output of this converter ranges
from 0 to 255 in unipolar mode (true binary value) and from -128 to +127 in bipolar mode (twos
complement value). The formulas below show how to convert the A/D converter reading to the
corresponding input voltage. In bipolar mode, the following conversion must be applied before using
these formulas, because the twos complement number is only an 8-bit wide value:
if A/D code >= 128 then A/D code = A/D code - 256
This will convert readings in the range +128 to +255 into their proper values of -128 to -1.
Since the A/D converter is 8 bits wide, it can resolve the input voltage signal (detect changes in input
voltage) to within 1/2
8
, or 1/256, of the full input range. This minimum detectable voltage difference
is equal to 1 least significant bit, or 1 LSB, because it is the change in input voltage required to cause
the A/D reading to change by 1 LSB. The value of 1LSB for each input range is shown below.
Converting A/D Converter Values to Equivalent Input Voltages
Input range 1LSB Conversion formula Notes
+/-5V 39.1mV Input voltage = 10V x A/D code / 256 ZMM-DX only
+/-2.5V 19.5mV Input voltage = 5V x A/D code / 256 ZMM-DX only
+/-1.25V 9.8mV Input voltage = 2.5V x A/D code / 256 ZMM-DX only
0 - 5V 19.5mV Input voltage = 5V x A/D code / 256 ZMM-DX only
0 - 2.5V 9.8mV Input voltage = 2.5V x A/D code / 256
0 - 1.25V 4.9mV Input voltage = 1.25V x A/D code / 256
13. ANALOG OUTPUT FORMULAS
Zircon-MM uses an 8-bit D/A converter to generate analog outputs. In all cases except when the
input voltage divider is used on ZMM-DX, the analog output range is identical to the analog input
range.
Zircon-MM uses true binary coding for unipolar output ranges and offset binary coding for bipolar
ranges. This means that writing a 0 to the D/A will always product an output at negative full scale,
and writing 255 to the D/A will always product an output at positive full scale (minus 1 LSB). Because
of offset binary coding, an offset must be added to the output code in bipolar mode to produce the
desired output voltage.
The table below shows how to calculate the output code needed to generate the desired output
voltage for each output voltage range on Zircon-MM. The output code is the 8-bit value written to the
D/A converter.
Converting Desired Output Voltages to D/A Converter Codes
Output range 1LSB Conversion formula Notes
+/-2.5V 19.5mV Output code = (Output voltage / 5V) x 256 ZMM-DX only
+/-1.25V 9.8mV Output code = (Output voltage / 2.5V) x 256 ZMM-DX only
0 - 2.5V 9.8mV Output code = (Output voltage / 2.5V) x 256
0 - 1.25V 4.9mV Output code = (Output voltage / 1.25V) x 256