2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 13:13:34 +08:00
artiq/examples/master/repository/dds_test.py

26 lines
607 B
Python

from artiq import *
class DDSTest(AutoDB):
__artiq_unit__ = "DDS test"
class DBKeys:
dds0 = Device()
dds1 = Device()
dds2 = Device()
led = Device()
@kernel
def run(self):
for i in range(10000):
if i & 0x200:
self.led.on()
else:
self.led.off()
with parallel:
with sequential:
self.dds0.pulse(100*MHz + 4*i*kHz, 500*us)
self.dds1.pulse(120*MHz, 500*us)
self.dds2.pulse(200*MHz, 100*us)
self.led.off()