
samples at all sampling rates.
Under Windows, the sampling may be affected by Windows activities. At the least, there will be gaps in the
data every 55 milliseconds due to the Windows timer function. There will be additional gaps if you move the
mouse, or have other programs running. We therefore recommend using the
adc100_get_values_and_times routine, so that you can determine the exact time that each reading was
taken.
The normal calling sequence to collect a block of data is as follows:
Check that the driver version is correct
Open the driver
Set trigger mode (if required)
Set sampling mode (channels and time per sample)
While you want to take measurements,
Get a block of data
End While
Close the driver
Scaling
The ADC-100 and ADC-101 are 12-bit analog to digital converters. This means that they produce values in the
range 0 to 4095 to represent the currently selected input voltage range. To convert from ADC readings to
Volts, you should subtract half of the 2048, multiply by the currently selected voltage range and divide by
2048. Thus, on the 5V range, an ADC reading of 3135 represents (3135-2048) x 5 / 2048 = 2.654 Volts.
adc100_get_driver_version
PREF1 short PREF2 adc100_get_driver_version (void);
This routine returns the version number of the ADC100/101 driver. You can use it to check that your
application is used only with the driver version that it was designed for use with.
Generally speaking, new driver versions will be fully backward compatible with earlier versions, though the
converse is not always true, so it should be safe to check that the driver version is greater than or equal to
the version that it was designed for use with.
The version is a two-byte value, of which the upper byte is the major version and the lower byte is the minor
version.
adc100_open_unit
PREF1 short PREF2 adc100_open_unit (short port);
This routine opens the ADC-100 driver.
For DOS and the 16-bit Windows driver, it checks the BIOS printer address table and gets the address of the
specified printer port. This is not possible in the Windows 32-bit driver, so it assumes that the printer ports 1..3
are at 0x378, 0x278 and 0x3BC.
It then calibrates the timing functions for the computer.
It returns
TRUE
if successful. If it is not successful,
you can call adc100_get_unit_info to find out why it failed.
port
The number of the parallel port that the ADC-100 is connected to (1 for LPT1, 2 for LPT2
etc).