examples: add SAWG sines (DAC synchronization test)

This commit is contained in:
Sebastien Bourdeauducq 2018-02-09 16:52:48 +08:00
parent bfdda340fd
commit e67a289e2b
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
from artiq.experiment import *
class SAWGTest(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("ttl_sma_out")
self.sawgs = [self.get_device("sawg"+str(i)) for i in range(8)]
@kernel
def run(self):
self.core.reset()
for sawg in self.sawgs:
delay(1*ms)
sawg.amplitude1.set(.4)
# Do not use a sub-multiple of oscilloscope sample rates.
sawg.frequency0.set(49*MHz)
while True:
delay(0.5*ms)
self.ttl_sma_out.pulse(0.5*ms)