sprintf(command, "DIAG:PEEK? %ld, %d", base_addr+0x02,8); IOOUTPUTS(CMD_MOD, command, strlen(command)); IOENTER(CMD_MOD, &bit_pat);

/* retain register settings, set pulse register as the high-speed */ /* clock source */

bit_reg = (int)(bit_pat + ((bit_pat >= 0) ? .5 : -.5)); bit_reg = (bit_reg & 0xF3);

sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr+0x02,8,bit_reg); IOOUTPUTS(CMD_MOD, command, strlen(command));

/* Send a clock pulse to the internal high-speed bus */ sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr+0x08,8,0); IOOUTPUTS(CMD_MOD, command, strlen(command));

/* using the traffic register, set the digitizer A/D as the clock */ /* source and as the data source for memory */

sprintf(command, "DIAG:PEEK? %ld, %d", base_addr+0x02,8); IOOUTPUTS(CMD_MOD, command, strlen(command)); IOENTER(CMD_MOD, &bit_pat);

/* retain register settings, set the A/D as the high-speed */ /* clock source and as the data source */

bit_reg = (int)(bit_pat + ((bit_pat >= 0) ? .5 : -.5)); bit_reg = (bit_reg & 0xF0) 0x04;

sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr+0x02,8,bit_reg); IOOUTPUTS(CMD_MOD, command, strlen(command));

/* initiate the timebase processor */

/* load the arm count and initialize the trigger counters */ sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr+0x59,8,0); IOOUTPUTS(CMD_MOD, command, strlen(command)); IOOUTPUTS(CMD_MOD, command, strlen(command)); IOOUTPUTS(CMD_MOD, command, strlen(command));

/* send the timebase processor initiate pulse */

sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr+0x45,8,0); IOOUTPUTS(CMD_MOD, command, strlen(command));

}

Continued on Next Page

398 Register Programming

Appendix C

Page 398
Image 398
HP E1429A manual On Next