VME Bus Data Transfers Using an Embedded Controller

The following programs transfer data over the VME bus using the following system configuration:

Controller: RadiSys® EPC®-7 Embedded Controller

Runtime library: Standard Instrument Control Library (SICL) for

DOS

Compiler:

Borland© C++ (.CPP)

These programs are also contained on the C language example programs disk (HP E1429-10302).

SEGTST16.CPP This program transfers 16-bit readings (real time) from the channel 1 A/D converter to the VME bus.

The include files and structure definitions used in this this program are listed following the SEGTST16.CPP and SEGTST32.CPP program listings.

//OptionsCompilerCodeGenerationModel: Set to Large

//OptionsDirectoriesInclude Directories: Add C:\EPCONNEC\INCLUDE

//OptionsDirectoriesLibrary Directories: Add C:\EPCONNEC\LIB

//Project Items: INST.CPP, E1429.CPP, SEGTST16.CPP, BSICL.LIB, EPCMSC.LIB

#include <stdlib.h> #include <stdio.h> #include "e1429.h"

#define BUFLEN 200

extern int ierrno;

int Measure(E1429 *Dig); int ReadData(E1429 *Dig);

/* *********************** Main *********************** */

void main(void) { int Errors; E1429 *Dig;

Errors = 0; ierrno = 0;

Continued on Next Page

72 Using the Digitizer

Chapter 2

Page 72
Image 72
HP E1429A manual VME Bus Data Transfers Using an Embedded Controller, Dos