
Chapter 4: Software
Manual Number: 00650-004-5
Page 4-5
int GETADDATA (unsigned int BASE_ADDRESS, unsigned int FIRSTCH, unsigned int
LASTCH, unsigned int SCANS, unsigned int pointer BUFFER):
This routine acquires data from the A/D card as quickly as possible using
programmed I/O. It repeats this data acquisition as many times as
programmed by SCANS on the channels delimited by FIRSTCH and
LASTCH. Its possible to acquire a single channel by setting FIRSTCH and
LASTCH to the same channel number.
The data resulting from this routine is stored in BUFFER. That pointer must
point to an array of sufficient size to contain all of the data. This routine will
generate (LASTCH - F 1) * SCANS elements of unsigned
integer data. See the
Error List
for descriptions of error codes.
integer GETADDMADATA(unsigned int BASE, unsigned int FIRSTCH, unsigned int LASTCH,
unsigned int SCANS, unsigned int *BUFFER, unsigned int DMAautoinit,
unsigned int DMAchannel, unsigned int IRQnumber)
This routine will use DMA to acquire data in the background at a programmed
rate. This routine will return an error value with the ADIO1600, which does
not support DMA operations.
int GETADIRQDATA()
-Reserved for future use-
This routine will use IRQs to acquire data in background at a programmed
rate.
int GETADINSDATA():
-Reserved for future use-
This routine will use InputStringOfData ASM instructions to acquire data
from a FIFO or RAM equipped card in the background at a programmed
rate.
Using the CDM Driver
The CDM driver is straightforward to use and varies little even across languages. Each CDM is an
Object file and has several include files associated with it. The C and C
++
include files are called
ACCES.H and ADCARD.H. The Pascal Interface files are called ACCES.INT and ADCARD.INT.
Examples are provided on diskette to illustrate use of these files. Each language has its own
directory and each directory contains the sample(s), the CDM.OBJ files, and the associated include
file(s).
Using the driver consists of writing the desired program with the appropriate include files, compil-
ing this program, and then linking the resultant object files with the CDM object file into an execut-
able program. Most modern languages allow you to perform the compile and link steps together
from within an editor shell or development environment. In C, this requires proper creation of a
Project or Make file. In contrast, the Pascal language allows the link steps and hierarchial source
relationships to be specified from within the source files, eliminating any need for a Project file.
Procedures specific to any given language can be found in documentation provided with the lan-
guage. Typically, this is in a section titled "Using Multiple Source Modules", "Linking", or "Inter-
facing to Other Languages". Please consult that documentation for further details if necessary.