diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 00:13:44 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 00:13:44 +0900 |
commit | dd925747f7ac9fad9bb95920dc7b07db48c9c56d (patch) | |
tree | 78eb78b96d8047d551424d2d2f0678cc5491c34b | |
parent | d5ac80b7501068c4ab4e8c4b3ce374f5d60ce2a8 (diff) |
Allow up to 16 DACs, by adding PCB 313A
-rw-r--r-- | device-functions.c | 4 | ||||
-rw-r--r-- | globals.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/device-functions.c b/device-functions.c index 64feb6d..eeddd67 100644 --- a/device-functions.c +++ b/device-functions.c @@ -228,7 +228,7 @@ void Main_Rst (void) void set_dac(int dac, int word) { /* allows dacs to be disabled (using dac=-1, for example) */ - if ((dac >= 0) && (dac < 8)) { + if ((dac >= 0) && (dac < max_dacs)) { globals.Registers.parallel_DAC_reg[dac]=word; } } @@ -4646,7 +4646,7 @@ void Main_update_shift_registers() bus_setpin(out_STROBE_LINE, 1); // latch the data bus_setpin(out_STROBE_LINE, 0); // release latch - for (i=0; i<8; ++i) { + for (i=0; i<std_dacs; ++i) { /* load the upper-nibble latch */ bus_writebyte ((uint8_t) (Octal_DACportCS_high), (uint8_t) (globals.Registers.parallel_DAC_reg[i] >> 8)); @@ -294,8 +294,11 @@ unsigned long long ms_timer (void); #define max_gpib_input_length 512 +#define max_dacs 16 // total number of DACs, including extras on PCB 313A, if used +#define std_dacs 8 // number of DACs on OP1B PCB + typedef struct { - int parallel_DAC_reg[8]; + int parallel_DAC_reg[max_dacs]; long shift_reg_out[num_out_SRs]; long last_relay_driver_settings[4]; int oper_enable_register; /* for stat:enable command */ |