Hello,

Sorry to bother you again, I ran into another problem of setting the DDS frequency and amplitude using set().

When I use this function once and alone, I did not have any problem setting the amplitude at 1.0V as I want. However when I use this function multiple time to create a ramp, I see that the amplitude changed, and it is not set to 1.0V. How can I fix this?

from artiq.experiment import*

steps=10
class DDSRampTest(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("urukul0_ch1")

    @kernel
    def run(self):
           self.core.reset()
           self.urukul0_ch1.set_att(0*dB)
           self.urukul0_ch1.cpld.init()
           self.urukul0_ch1.init()
           self.urukul0_ch1.sw.on()
           self.urukul0_ch1.set(1*MHz, 1.0)
           delay(50*us)
           for i in range(steps):
                    self.urukul0_ch1.set((1+i*0.5)*MHz, 1.0)
                    delay((0.5/steps)*ms)
           self.urukul0_ch1.sw.off()

Try to use a higher frequency. 1MHz is near the lower limit for the bandwidth of the analog chain on Urukul, so you are probably seeing attenuation from it, and the higher the frequency the less attenuated the signal is. It should stabilize after you go sufficiently away from 1MHz.

Hello, I've changed the frequency to 100MHz:

           self.urukul0_ch1.set(100*MHz, 1.0)
           delay(50*us)
           for i in range(steps):
                    self.urukul0_ch1.set((100+i*1)*MHz, 1.0)
                    delay((0.5/steps)*ms)

and I still have the same amplitude problem, however, the value is now closer to the set value 1.00V. How can I fix this?

Did you terminate the signal with 50 ohms?

What's the oscilloscope bandwidth? Is the behavior reproducible with another oscilloscope model? What happens at even higher frequencies (without touching the oscilloscope settings)?