def reset(board): # put RESET pin to "0" selection.decoder(board) spi.writebytes([0x06]) selection.clk_ff(board) # put RESET and CLR pin back to "1" selection.decoder(board) spi.writebytes([0x04]) selection.clk_ff(board)
def clear(board): # put CLR pin to "0" selection.decoder(board) spi.writebytes([0x05]) selection.clk_ff(board) # put CLR and RESET pin back to "1" selection.decoder(board) spi.writebytes([0x04]) selection.clk_ff(board)
def on(board): selection.decoder(board) # put PWR_GOOD_ADC to "1" spi.writebytes([0x02]) selection.clk_ff(board) #------------------------ # read calibration parameters global GAIN, OFFSET GAIN = flash.adc_gain_read(board) OFFSET = flash.adc_offset_read(board)
def on(board): global GAIN, OFFSET selection.decoder(board) # put PWR_GOOD_DAC to "1" spi.writebytes([0x00]) selection.clk_ff(board) #------------------------ # read calibration parameters selection.flash(board) GAIN = flash.dac_gain_read(board) if (GAIN == 0): GAIN = 1 OFFSET = flash.dac_offset_read(board)
def off_all(): for board in range(8): selection.decoder(board) # put PWR_GOOD_DAC to "1" spi.writebytes([0x01]) selection.clk_ff(board)
def off(board): selection.decoder(board) # put PWR_GOOD_DAC to "1" spi.writebytes([0x01]) selection.clk_ff(board)