def ltc2508_32_dc2222a_b(num_samples, df, verify, is_distributed_rd, is_filtered_data, verbose=False, do_plot=False, do_write_to_file=False): with Dc2222aB(df, verify, is_distributed_rd, is_filtered_data, verbose) as controller: # You can call this multiple times with the same controller if you need tos data, cm_data = controller.collect(num_samples, consts.TRIGGER_NONE) # To change the df, verify, and/or distributed read, call the following # function before a collect. # config_cpld(df, verify, is_distributed_rd) if do_plot: funcs.plot(controller.get_num_bits(), data, verbose=verbose) if cm_data is not None: from matplotlib import pyplot as plt plt.figure(2) plt.plot(cm_data) plt.title('Common Mode Time Domain Samples') plt.show() if do_write_to_file: funcs.write_to_file_32_bit("data.txt", data, verbose=verbose) if cm_data is not None: funcs.write_to_file_32_bit("cm_data.txt", cm_data, verbose=verbose) return data
def ltc2368_16_dc1813a_b(num_samples, verbose = False, do_plot = False, do_write_to_file = False): # connect to the DC1813A-B and do a collection with Dc1813aB(verbose) as controller: # You can call this multiple times with the same controller if you need to data = controller.collect(num_samples, consts.TRIGGER_NONE) if do_plot: funcs.plot(controller.get_num_bits(), data, verbose=verbose) if do_write_to_file: funcs.write_to_file_32_bit("data.txt", data, verbose=verbose) return data
def ltc2221_dc750(num_samples, verbose=False, do_plot=False, do_write_to_file=False): with Dc750(verbose) as controller: # You can call this multiple times with the same controller if you need to data = controller.collect(num_samples, consts.TRIGGER_NONE) if do_plot: funcs.plot(data) if do_write_to_file: funcs.write_to_file_32_bit(data, "data.txt") return data
def ltc2380_24_dc2289a_a(num_samples, osr, verify, is_disributed_rd, verbose=False, do_plot=False, do_write_to_file=False): with Dc2289aA(osr, verify, is_disributed_rd, verbose) as controller: # You can call this multiple times with the same controller if you need to data = controller.collect(num_samples, consts.TRIGGER_NONE) # To change the OSR, verify, and/or distributed read, call the following # function before a collect. # config_cpld(osr, verify, is_disributed_rd) if do_plot: funcs.plot(controller.get_num_bits(), data, verbose=verbose) if do_write_to_file: funcs.write_to_file_32_bit("data.txt", data, verbose=verbose) return data