User`s manual

PK2100
Software Reference s 5-3
Analog Input
The A/D system relies on software calibration, using calibration constants
stored in the system EEPROM. Uncalibrated values are in the range
01023, with each count representing approximately 10 millivolts.
Calibrated values are kept on a scale 010,000, with each count represent-
ing 1 millivolt, or in the case of the single high-gain input, 0.1millivolt.
Since it requires about 200milliseconds to convert an uncalibrated value
to a calibrated value or vice versa, preliminary data storage or averaging
may be done using uncalibrated values to save computing time. The
following utility routines convert back and forth between uncalibrated and
calibrated values.
int up_docal( int raw_value ) // return calibrated
// value from raw
int up_uncal( int cal_value ) // return raw value
// from calibrated
Low-Level Direct Driver
int up_adrd( int channel )
Returns a 10-bit uncalibrated value scaled so that 1023 corresponds to
full scale (10volts). The conversion time is less than 200millisec-
onds. Each count represents approximately 10 millivolts.
The channel may be 18. Channels 16 are universal inputs. Channel
8 may be used as a universal input unless it is used with the high-
sensitivity input, Channel 7.
Calibrated Direct Driver
int up_adcal( int channel )
Returns a voltage value scaled so that the value 10,000 represents
10volts. The calibration applied considers the actual value of the
voltage reference and the nonlinearity of UEXP. The calibration for
the high-sensitivity input, Channel 7, is such that 10,000 equals 1volt.
(Values slightly less than 0 and slightly over 10,000 are possible.)
int up_in420()
Returns the current flowing through universal Channel 6 when
subjected to a current input. The function returns 1000 for each
milliampere. The maximum value is approximately 25,000. Jumper
H6-6 must be connected to H5-6 and Jumper H5-7 must be connected
to H5-8 to place a load resistor equivalent to 392Ω in the circuit. The
driver must be able to deliver an input voltage of about 8volts to
achieve 20milliamps.