HP (Hewlett-Packard) B Network Router User Manual


 
#define ADDR_G 70905L /* I/O path from the PC to the generator digitizer */
#define ADDR_I 70906L /* I/O path from the PC to the inserter digitizer */
#define ADDR_MEM 70903L /* I/O path from the PC to the memory card */
#define CMD_MOD 70900L /* I/O path from the PC to the Command Module */
/* Function Prototypes */
void rst_clr(long address);
long get_base_addr(void);
void configure(void);
void initiate(long base_addr);
void check_error(char *func_tion, long address);
/****************************************************************************/
void main(void) /* run the program */
{
long base_addr; /* variable for A24 base address */
clrscr();
rst_clr(ADDR_G); /* reset the generator digitizer */
rst_clr(ADDR_I); /* reset the inserter digitizer */
rst_clr(ADDR_MEM); /* reset memory card */
base_addr = get_base_addr(); /* get digitizer A24 base address */
configure(); /* configure the digitizers and memory card*/
initiate(base_addr); /* initiate the digitizers and memory card; */
/* retrieve the readings from the memory card */
}
/****************************************************************************/
void configure(void)
{
int length = 0, loop = 0;
/* use the "digitizer1" array to configure the generator digitizer */
char static *digitizer1[] =
{"CONF1:ARR:VOLT (10),5,(@3)", /* set 10 readings, 5V range, */
/* channel, 1 input port 3 */
"ARM:STAR:SOUR TTLT0", /* set arm source */
"ARM:STAR:DEL 50E-6", /* set arm delay */
"VINS:LBUS:RES", /* reset the Local bus chip */
"VINS:LBUS:MODE GEN", /* set Local bus mode to GENerate */
"VINS:LBUS:FEED ’CONV:CHAN1’"}; /* set Local bus feed */
Continued on Next Page
94 Usin
g
the Di
g
itizer Chapter 2