class spirack.U2_module(spi_rack, module, reset_voltages)
U2 module interface class. When creating an instance it requires a SPI_rack class and a module number passed as a parameter. It is a child class of the D5a_module class, so it has all the same functions and attributes. Inside the module is one of the D5a DAC pcbs.
The module controls the data going to the shift registers of the cryomux. At initialization all the DACs in the module will be set to +-4V span and set to 0 Volt (midscale) if reset_voltages=True
.
Parameters:
range_4V_bi
. If a voltage jump would occur, then ramp to zero in steps of 10 mV. Defaults to Trueset_switch_supply(voltages)
Sets the supply voltages for the switches.
Parameters:
get_switch_supply()
Gets the current switch supply voltages.
Returns - List of switch supply voltages (float): [pos_voltage, neg_voltage]
set_register_supply()
Sets the supply voltages for the shift registers.
Parameters:
get_register_supply()
Gets the current shift register supply voltages.
Returns - List of shift register supply voltages (float): [pos_voltage, neg_voltage]
set_data_levels(voltages)
These voltages correspond to the digital high/low values. Also sets the comparator level to midway between these values.
Parameters:
get_data_levels()
Gets the currently set data voltages.
Returns - List of data voltages (float): [low_voltage, high_voltage]
set_comparator_level(voltage)
The data being send back is toggled between the two supply levels of the shift register. These are voltages that the SPI Rack is not familiar with. A comparator is placed on the input to translate these levels back to 0-3.3V.
Parameters:
get_comparator_level()
Gets the currently set comparator voltage.
Returns - Comparator voltage (float)
select_mux(mux)
Activates the selected mux. Writes the correct SPI code to the shift registers to select the desired mux.
Parameters:
select_multiple_muxes(mux)
Activates the selected muxes. This function allows the user to select multiple muxes.
Parameters:
get_active_mux()
Returns which muxes are active. Can be one or more.
Returns - the active mux(es)
write_bulk_data(data, SPI_mode=CRYOMUX_MODE)
Allows the writing of an arbitrary amount of data.
Parameters:
read_bulk_data(data, SPI_mode=CRYOMUX_MODE)
Allows the reading of an arbitrary amount of data.
Parameters:
Returns - bytes received from the shift register (int list)