HMC833Controller
- class rfblocks.hmc833_controller.HMC833Controller(controller_id: str, device: hmc833, config: Dict | None = None)[source]
Higher level control for the HMC833 phase locked oscillator.
Documentation for the HMC833 frequency synthesizer rfblocks module can be found here: An HMC833 Frequency Synthesizer
- Parameters:
controller_id (str) – The controller name.
device (
rfblocks.hmc833
) – An instance ofrfblocks.hmc833
.config – Initial configuration for the HMC833 PLO board. If this is None the default configuration will be used. See
HMC833Controller.DEFAULT_DEVICE_CONFIG
for a brief description of the structure forconfig
.
HMC833Controller
maintains the state configuration for an HMC833 PLO board. The following signals are defined:freq_changed(float)
ref_freq_changed(float)
refsrc_changed(hmc833.ReferenceSource)
bufgain_changed(hmc833.OutputBufferGain)
divgain_changed(hmc833.DividerGain)
vco_mute_changed(bool)
lock_status_changed(bool)
- property buffer_gain: OutputBufferGain
The PLO current output buffer gain setting.
- check_plo_lock(ser: Serial) bool [source]
Check the current PLL/VCO lock status.
- Returns:
A boolean value indicating the PLO lock status.
True
for locked.
As a side effect, this method may update the value of the
lock_status
property which in turn may emit thelock_status_changed
signal.
- configure(ser: Serial) bool [source]
Update the PLO hardware using the currently set configuration.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
- Returns:
A boolean value indicating the PLO lock status.
True
for locked.
- configure_chargepump(ser: Serial) None [source]
Update the PLO hardware with the current charge pump settings.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
- configure_freq(ser: Serial, retry_lock: bool = True) bool [source]
Update the PLO hardware with the currently set output frequency.
Note that in some circumstances the PLO may not find lock. When this happens the retry_lock parameter determines what should happen next. If initial PLO lock isn’t achieved and retry_lock is True the frequency configuration at a slightly different frequency is attempted followed by configuration at the specified frequency. In almost all cases this results in PLO lock. If retry_lock is False the frequency configuration is carried out only once even if initial PLO lock isn’t achieved. In all cases the PLO lock status is returned.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
retry_lock – Whether to retry frequency configuration if initial PLO locked isn’t achieved.
- Returns:
A boolean value indicating the PLO lock status.
True
for locked.
- configure_gains(ser: Serial) None [source]
Update the PLO hardware with the current gain settings.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
- configure_refdiv(ser: Serial) None [source]
Update the PLO hardware with the current reference divider value.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
Warning
This method does not seem to work in 100% of cases when using spur data calculated from Analog’s ADI SimFrequencyPlanner. At present it is unknown why. Use with caution.
- configure_refsrc(ser: Serial) None [source]
Update the PLO hardware with the current reference source status.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
Warning
This method does not seem to work in 100% of cases when using spur data calculated from Analog’s ADI SimFrequencyPlanner. At present it is unknown why. Use with caution.
- configure_vco_mute(ser: Serial) None [source]
Update the PLO hardware with the current VCO mute status.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
- property cp_gain: float
Returns the current charge pump gain (mA)
- property divider_gain: DividerGain
The PLO current divider output stage gain setting.
- dump_config() Dict [source]
Return the current synthesizer configuration.
- Returns:
- A dictionary containing the current synthesizer
configuration:
- freq:
synthesizer output frequency
- ref_freq:
synthesizer reference frequency
- refsrc:
reference source
- bufgain:
output buffer gain setting
- divgain:
frequency divider buffer gain setting
- vco_mute:
output mute status
- property freq: float
Returns the current output frequency (in MHz)
- initialize(ser: Serial) bool [source]
Initialize the PLO board.
- Parameters:
ser (serial.Serial) – Device update commands will be sent via this serial device.
- load_config(config: Dict) None [source]
Set the current synthesizer configuration.
- Parameters:
config (Dict) – A dictionary containing the synthesizer configuration to be set.
Note that in order to update the synthesizer hardware
configure()
should be called.
- property ref_div: int
The current PLO reference divider value.
- property ref_freq: float
The current reference frequency (in MHz).
- property refsrc: ReferenceSource
The reference source for the module.
- property vco_mute: bool
Mute status of the PLO VCO output.