
/****************************************************************************/ void initiate(long base_addr)
{
/* This function initializes and initiates the timebase processor. This includes */ /* initializing the processor, setting the trigger
/* the sample rate, setting the A/D as the data source for memory, and initiating */ /* the timebase processor. Note that the registers must be read and written to */ /* in the sequence shown. */
char command[80]; float bit_pat = 0;
int | *addr_ptr, *data_ptr, bit_reg = 0; |
int | tb_addr [] = {0x41,0x5F, 0x65, 0x67, 0x69, 0x6B, 0x7D, 0x7F, |
int | tb_data [] = {0, 1, 1, 5, 0, 0, 0, 0}; |
data_ptr = tb_data;
/* reset the timebase processor by writing the values to the corresponding */ /* registers shown above */
for (addr_ptr = tb_addr; *addr_ptr !=
{
sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr + *addr_ptr, 8, *(data_ptr++)); IOOUTPUTS(CMD_MOD, command, strlen(command));
}
/* since only
/* write least significant byte of
sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr+0x73,8,1); IOOUTPUTS(CMD_MOD, command, strlen(command));
/* write
sprintf(command, "DIAG:POKE %ld, %d, %d", base_addr+0x75,8,0); IOOUTPUTS(CMD_MOD, command, strlen(command));
/* set the trigger count
/* write
Continued on Next Page
396 Register Programming | Appendix C |