ADC-10, ADC-12, ADC-40 and ADC-42 User's Guide adc1042.en-2 Copyright © 1995-2007 Pico Technology. All rights reserved.
I ADC-10,12,40,42 User's Guide Contents 1 Contents .....................................................................................................................................1 2 Introduction .....................................................................................................................................2 ...........................................................................................................................................3 1 Connecting to the PC ..........
Contents 1 1 Contents 1. 2. 3. 4. Introduction Connecting to PC Specifications Technical Information Writing your own software (overview) C/C++ Visual Basic Delphi Excel Agilent VEE LabVIEW Linux Other information Contact Pico Technical Support Signal Conditioners Safety Legal Print this manual Copyright © 1995-2007 Pico Technology. All rights reserved. adc1042.
2 2 ADC-10,12,40,42 User's Guide Introduction The Pico ADC-10, ADC-12, ADC-40 and ADC-42 are medium-speed, single-channel, analogue-to-digital converters. All of these products can be used as virtual instruments (oscilloscope / spectrum analyser) with the PicoScope program, or as a data logger using PicoLog. There are also stand-alone programs to collect large blocks of data under Windows.
Introduction 2.1 3 Connecting to the PC The ADC-10, ADC-12, ADC-40 and ADC-42 can be connected to the PC in two ways: directly to a printer port on the computer to a USB port on the computer, via a Pico USB parallel port adapter. Printer port operation When you install the application software from the Pico CD, the computer will ask you which port to use. You should select LPT1, LPT2 or LPT3.
4 2.2 ADC-10,12,40,42 User's Guide Legal information Grant of licence The material contained in this release is licensed, not sold. Pico Technology Limited grants a license to the person who installs this software, subject to the conditions listed below. Access The licensee agrees to allow access to this software only to persons who have been informed of and agree to abide by these conditions.
Introduction 5 Pico Technology Limited, DrDAQ and PicoScope are internationally registered trade marks. 2.3 Safety warning We strongly recommend that you read the general safety information below before using your product for the first time. If the equipment is not used in the manner specified, then the protection provided may be impaired. This could result in damage to your computer and injury to yourself or others.
6 ADC-10,12,40,42 User's Guide 3 Product Features 3.1 Specification Resolution Number of input channels Input range Maximum sampling rate Repeatability Absolute accuracy Overvoltage protection Input impedance Output connector Input connectors Power requirements Environmental conditions 3.
Product Features 7 BM_STREAM is useful when you need to collect data continuously for long periods. In principle, it would be possible to collect data indefinitely. Each time adc10_get_values is called, it returns the new readings since the last time it was called. No_of_values passed to adc10_run must be sufficient to ensure that the buffer does not overflow between successive calls to adc10_get_values.
8 4 ADC-10,12,40,42 User's Guide Driver Formats & Routines The ADC-10, ADC-12, ADC-40 and ADC-42 are supplied with driver routines that you can build into your own programs. Drivers are provided for the following operating systems: Windows XP Windows Vista Linux Once you have installed the software, the Examples subdirectory contains the drivers and a selection of examples of how to use the drivers. It also contains a copy of this help file in text format.
Driver Formats & Routines 9 You can specify a sampling interval from 50 µs to a second. If you specify an interval that is shorter than your computer can manage, the driver will tell you how long it will actually take to collect the specified number of samples. Under Windows, if you connect the product to the computer via a Pico USB parallel port, timing is completely reliable. However, if you connect the product to the computer via the printer port, the sampling may be affected by Windows activities.
10 ADC-10,12,40,42 User's Guide The Linux parallel port driver kit supports only units connected direct to the parallel port: it does not support USB-connected devices. adc1042.en-2 Copyright © 1995-2007 Pico Technology. All rights reserved.
Driver Formats & Routines 4.2 Procedures 4.2.1 adc10_get_driver_version 11 short adc10_get_driver_version (void) This routine returns the version number of the ADC-10 driver. You can use it to check that your application is used only with the driver version that it was designed for use with.
12 ADC-10,12,40,42 User's Guide This routine closes the ADC-10 driver. Arguments port The number of the parallel or USB port 4.2.4 adc10_set_unit short adc10_set_unit ( short port ) This routine is used to select the unit to use for subsequent operations. It is only necessary to use this function if you wish to have more than one unit open at the same time. 4.2.5 adc10_get_value short adc10_get_value (void) This routine reads the current value of one channel.
Driver Formats & Routines 4.2.7 13 adc10_set_trigger void adc10_set_trigger ( unsigned short enabled, unsigned short auto_trigger, unsigned short auto_ms, unsigned short dir, unsigned short threshold, short delay ) This routine defines a trigger event for the next block operation, and specifies the delay between the trigger event and the start of collecting the data block. Note that the delay can be negative for pre-trigger.
14 4.2.8 ADC-10,12,40,42 User's Guide adc10_set_interval unsigned long adc10_set_interval ( unsigned long us_for_block, unsigned long ideal_no_of_samples ) This routine specifies the time interval per sample and the channels to be used for calls to adc10_get_values or adc10_get_times_and_values. Arguments us_for_block target total time in which to collect ideal_no_of samples, in micro seconds. ideal_no_of_samples specifies the number of samples that you intend to collect.
Driver Formats & Routines 15 4.2.10 adc10_run void adc10_run ( unsigned long no_of_values, unsigned short method ) This routine starts a streaming unit collecting data It collects readings at intervals and from channels specified in the most recent adc10_set_interval call. For non-streaming devices, this function has no effect.
16 ADC-10,12,40,42 User's Guide For non-streaming devices, if F9 or F10 is pressed while collecting, the routine will return immediately. In BM_SINGLE and BM_WINDOW modes, the return value will be zero if a key was pressed, and the total time in microseconds if a block was successfully collected. In BM_STREAM mode, the return value will be the number of new readings placed in the values buffer. 4.2.
Driver Formats & Routines 17 str_lth length of buffer line 0 to 3: selects which line to return port the printer port number (1..3) to return information for 4.2.16 adc10_labview_single unsigned short adc10_labview_single ( float * result, unsigned short port, unsigned short type ) This function is provided for LabVIEW programmers. It returns a single conversion result.
18 ADC-10,12,40,42 User's Guide 5 Programming Support 5.1 C Windows There are two C example programs: one is a very simple GUI application, and the other is a more comprehensive console mode program that demonstrates all of the facilities of the driver. The GUI example program is a generic windows application- ie it does not use Borland AppExpert or Microsoft AppWizard. To compile the program, create a new project for a Windows Application containing the following files: either or adc10tes.
Programming Support 5.3 19 Excel The easiest way to get data into Excel is to use the PicoLog for Windows program. However, you can also write an Excel macro which calls adc10xx.dll to read in a set of data values. The Excel Macro language is similar to Visual Basic. The example ADC10xx.XLS reads in 20 values from channels 1 and 2, one per second, and assigns them to cells A1..B20. Note: it is usually necessary to copy the .DLL file to your directory. 5.
20 ADC-10,12,40,42 User's Guide Index C C 18 Connecting to the PC Contents 1 3 D Delphi 18 Drivers 8 E Excel 19 H HP-Vee 19 I Introduction 2 L LabVIEW 19 Legal information Linux 9 4 P picopar 9 S Safety warning 5 Scaling 7 Specification 6 Streaming 6 T Technical information 7 V Visual Basic 19 W Windows adc1042.en-2 9 Copyright © 1995-2007 Pico Technology. All rights reserved.
21 Copyright © 1995-2007 Pico Technology. All rights reserved. adc1042.
Pico Technology Ltd The Mill House Cambridge Street St Neots PE19 1QB United Kingdom Tel: +44 (0) 1480 396 395 Fax: +44 (0) 1480 396 296 Web: www.picotech.com adc1042.en-2 18.6.07 Copyright © 1995-2007 Pico Technology. All rights reserved.