Instruction manual

AMPDIO DRIVERS
Page 79
6 PROGRAMMING WITH THE AMPDIO DRIVER
6.1 Windows DLL and Examples
The AMPDIO DIO_TC DLL is a Windows programmer's interface to the analogue and digital IO
boards. As long as the compiler/interpreter supports Windows, i.e. uses the Windows calling
conventions; all the functions can be called by software written in any language.
The application interface to the driver is defined in a number of header files, for use by different
languages.
Module definition file Language
DIO_TC.H and ADIOCTL.H Microsoft C/C++ versions 4.x upwards
Borland C/C++ versions 4.x and 5.x
DIO_TC.BAS Microsoft Visual Basic version 5.0
DIO_TC.VB Microsoft Visual Basic .NET
DIO_TC_H.CS Microsoft Visual C# .NET
DIO_TC.PAS Borland Delphi version 3.0
DIO_VEE.H HP VEE version 4.0
For other languages, the user will need to compile a suitable header, in which the DLL functions
and constants are declared, using DIO_TC.H as an example. For C programming, some useful
macros for constant values may be found in ADIOCTL.H. For Visual Basic, these constants are in
the DIO_TC.BAS file. For Delphi programming, they are in the DIO_TC.PAS file.
6.2 Support in DOS
The support in DOS is limited to the DOS software supplied separately with individual cards and
this is documented in the card manuals. Note, for PCI cards no DOS software is shipped, however
a FINDCARD utility is supplied to enable users to develop their own DOS software for these cards.
The FINDCARD utility does function under a Windows environment.
The FINDCARD utility will find any installed Amplicon PCI cards and report the plug and play
resource allocation. With this information DOS applications can be written for the cards in
languages such as Turbo Pascal and Microsoft C.
FINDCARD
Card #1 = PCI230 Int = $0B Port 1 = $DC00 Port2 = $E00
Where:
Int is the assigned interrupt.
Port1 is the 8-bit register IO space.
Port2 is the 16-bit register IO space.
Please check MEV’s web site for up to date DOS PCI Plug and Play libraries and utilities.
6.2.1 Windows Library Source Code
The application interface library ‘DIO_TC.DLL’ is supplied in both executable form and as C’
source code. The source code can be compiled using Microsoft C/C++ compiler version 4.0 or
greater or Borland C++ version 4.0 compiler. The project workspace DIO_TC.MDP, DIO_TC.DSW