Hi, I need a bit of help setting up a new phaser (upconverter variant). At the moment, I am able to drive five signals between 1.251 GHz and 1.255 GHz with the following script:
`
from artiq.experiment import *

class phaser(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("phaser0")

@kernel
def run(self):
    self.core.reset()
    self.phaser0.init(debug=False)
    
    ch = self.phaser0.channel[0]
    ch.set_att(0*dB)
    self.core.break_realtime()
    
    for i in range(5):
        ch.oscillator[i].set_frequency((i+1.) * MHz)
        ch.oscillator[i].set_amplitude_phase(amplitude=0.18)
        delay(1*ms)`

I'm having a hard time trying to:

  1. Change the frequency range (the PLL/VCO frequency). My goal is to have the carrier at 80 MHz (so that I can access a frequency range of [70, 90] MHz). First, is that possible with the upconverter variant? And if that's the case, how do I do that? I realize that I have to change the dividers of the TRF372017 via the device_db file and change the nco frequency, but how exactly? The trf datasheet didn't help me much.
  2. Changes of the nco frequency change do,'t affect my signal, I figured it has to be activated, but again the question how.
  3. Is there an easy way of amplifying the output (some PLL/VCO settings maybe)?
  4. In the future, we would like to use the phaser as a stft pulse generator (as presented in the thesis), but for now I found my answers here.

Thanks in advance

  1. The minimum carrier frequency of the TRF is 300 MHz (datasheet title line). I don't know whether anyone has ever tried going below that with the LSB. You'd have to use the NCO (DAC) at -220 MHz. The datasheet does describe the TRF. The chip has a lot of knobs and there is no practical way to abstract over them that does not restrict its functionality. You may want to try the eval board software from TI to determine register settings.
  2. See dac_sync() for some pointers.
  3. There are a couple of settings (for example bias currents) in the DAC and TRF that affect output power. It's usually not easy since they also have other effects (like distortion) but they are there. And there may not be much to be gained.

Thanks, that helped me using the nco.

However, I am still struggling with the trf. I can figure out from the datasheet which bits need addressing, however I am lost in the assembling of the data in trf_write with address, bits I want to change and bits that should remain unchanged (that I would get from trf_read).

What I would appreciate is a wrapper of the trf_write function so I can change only certain bits in a given register (0 to 7 similar to trf_read), while leaving the other bits as they are.
Another function that takes the value from trf_read(addr) and writes it to the register in case I mess things up would also be nice (I don't think that's very complicated, but I dont' know how to handle negative values I get from trf_read for some registers).

That's probably not what you really want, but if you do, you can try writing such a function yourself. The bigger problem will be that the TRF doesn't support complete read-back.
Instead add trf0 and trf1 dictionaries to the device db entry arguments for phaser to change the default settings.
Again, consider using the eval software to figure out what bits you actually want to set to what value here.