HP (Hewlett-Packard) B Network Router User Manual


 
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.
// Options|Compiler|CodeGeneration|Model: Set to Large
// Options|Directories|Include Directories: Add C:\EPCONNEC\INCLUDE
// Options|Directories|Library 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 Usin
g
the Di
g
itizer Chapter 2