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

24 lines
574 B
Python

from artiq import *
class DDSTest(AutoDB):
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()