top01.jpg (17169 bytes)
mleft.jpg (4986 bytes) m01a.jpg (6169 bytes)     m02a.jpg (6905 bytes)     m03a.jpg (7743 bytes)    m04a.jpg (7456 bytes)     m05a.jpg (7878 bytes)     m06a.jpg (6862 bytes)     m07a.jpg (6076 bytes) mright01.jpg (5078 bytes)

ADU  Series - USB Data Acquisition Interface SDK

AduHid - Borland C Example

This example uses the Borland C++ 5.5.1 compiler. Download a free trial of Borland C++ Builder from the www.borland.com web-site (unless Borland has recently changed their policies).

Granted it is a command-line compiler but the price is right.

This example shows the steps to compile a simple application to communicate with an ADU USB device.

Install the Borland Compiler

Download and install the Borland compiler onto the computer.

Create A Project Directory


Create a directory to hold the project. Here it is called "g:\Borland".
Copy the following files into the project directory.

  • AduHid.h
  • AduHid.lib
  • AduHid.dll

Convert AduHid.lib To OMF

The AduHid.lib is distributed in COFF format. The Borland C++ compiler chokes on COFF files. Fortunately Borland supplies a program that converts COFF files to OMF format.

In a DOS Command Window run:

Coff2Omf AduHid.lib AduHidOMF.lib



Note: to avoid contravening the Borland copyright we do not distribute the OMF file created by this step.

Create The Source Code

Use a favorite editor to create the source code file.

Compile and Run The Source Code

In a DOS Command Window:
navigate to the directory containing the source code
run the following compile command.

BCC32 -Ij:\Borland\BCC55\Include -Lj:\Borland\BCC55\Lib AduHidOMF.lib aduusb.c

(In case the above line is too long for the browser here it is in pieces)

 
BCC32 -Ij:\Borland\BCC55\Include
    -Lj:\Borland\BCC55\Lib
    AduHidOMF.lib aduusb.c


Note: The Borland compiler demo on this computer is installed in j:\Borland\BCC55. The -I parameter points at the Include sub-directory. The -L parameter points at the Lib sub-directory. Adjust the command to match the compiler directory on the computer being used.
Note: the command must be entered as a single line on the DOS Command window.

Run the program from the DOS Command window.

Acknowledgements

Thanks to Mr. Borland for developing the compiler used in this tutorial.

 

NEWS         PRODUCTS         PROGRAMMING          APPLICATIONS          CUSTOM DESIGN          ORDERING          HOME


TestPoint is a trademark of Capital Equipment Corp.   
LabVIEW is a trademark of National Instruments.
Visual BASIC is a trademark of Microsoft Corporation


Copyright © 2002 ONTRAK CONTROL SYSTEMS 764 Notre Dame Ave, Unit #1 , Sudbury, Ontario, CANADA P3A 2T2  
"Quality serial Data Acquisition Interfaces"           PH. (705) 671-2652 FAX (705) 671-6127