Drivers

Pico ADC-16

Drivers

Top  Previous  Next

 

If you wish to use the ADC-16 with your own software, it is possible to drive the ADC-16 directly- see the example programs adc16a.c and adc16a.pas. It is, however, usually easier and more reliable to use the drivers provided.

Drivers are provided for the following operating systems:

       Windows XP (SP2)

       Windows Vista

 

Once you have installed the software, the DRIVERS directory contains a demo program which shows exactly how to drive the ADC-16, and an advanced driver which is easier to use and more powerful. It also contains a copy of this manual as a text file. See the Readme.doc file in the DRIVERS directory for the filenames.

The advanced driver routine is supplied as a Windows Dynamic Link Library for 32-bit programs, called adc1632.dll.

The object file uses Pascal linkage conventions and does not require any compiler run-time routines: it can therefore be used with most C compilers.

The Windows DLLs can be used with C, C++, Delphi and Visual Basic programs: it can also be used with programs like Microsoft Excel, where the macro language is a form of Visual Basic, and with the National Instruments LabView application.

More than one application can access the Windows DLL at the same time, as long as the applications do not change the settings for channels that they are not using.

The following table specifies the function of each of the routines in the driver:

Routine

Function

adc16_open_unit

Open the driver to use a specified serial port(s)

adc16_close_unit

Close the port (ALWAYS DO THIS!)

adc16_set_channel

Specify the resolution, single-ended/differential and filtering for a channel

adc16_get_value

Get the most recent ADC reading from a channel

adc16_get_filtered_value

Get the filtered ADC value for this channel

adc16_get_version

Get the ADC-16 version number

adc16_poll

Not normally necessary

adc16_get_cycle

Returns the number conversion cycles since the unit was opened.