Chapter 5
Chapter 5
Chapter 5
Chapter 5
Chapter 5
Software
23
Example (C language):
extern pcl813(int, unsigned int *);
unsigned param[60];
/* Parameter Table */
unsigned buffer[100];
/* A/D data buffer */
main()
{
unsigned far *ptr;
/* buffer pointer */
tr = (unsigned far *) buffer;
param[0] = 0;
/* card number
*/
param[1] = 0x220;
/* I/O base address */
param[10] = FP_OFF(ptr);
/* offset address */
param[11] = FP_SEG(ptr);
/* segment address */
param[12] = 0;
/* only one buffer used
*/
param[13] = 0;
param[14] = 100;
/* number of A/D conver-
sion */
param[15] = 0x0;
/* A/D start channel*/
param[16] = 0xA;
/* A/D stop channel */
param[17] = 0x0;
/* gain code */
pcl813(3,param);
/* initialize the PC-
LabCard */
pcl813(4,param);
/* initialize A/D func
tion */
pcl813(5,param);
/* A/D conversions, and
store*/
/* converted data to
buffer */
.
.
}
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com