add stepper pulser
This commit is contained in:
parent
bd903b530d
commit
6e95a08608
|
@ -0,0 +1,46 @@
|
||||||
|
from artiq.experiment import *
|
||||||
|
|
||||||
|
|
||||||
|
class Stepper(EnvExperiment):
|
||||||
|
def build(self):
|
||||||
|
self.setattr_device("core")
|
||||||
|
self.setattr_device("ttl0")
|
||||||
|
self.setattr_device("ttl1")
|
||||||
|
|
||||||
|
@kernel
|
||||||
|
def run(self):
|
||||||
|
self.core.reset()
|
||||||
|
while True:
|
||||||
|
delay(5*ms)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl0.pulse(5*us)
|
||||||
|
delay(5*us)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl0.pulse(2*us)
|
||||||
|
delay(2*us)
|
||||||
|
for i in range(100000):
|
||||||
|
self.ttl0.pulse(1*us)
|
||||||
|
delay(1*us)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl0.pulse(2*us)
|
||||||
|
delay(2*us)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl0.pulse(5*us)
|
||||||
|
delay(5*us)
|
||||||
|
|
||||||
|
delay(5*ms)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl1.pulse(5*us)
|
||||||
|
delay(5*us)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl1.pulse(2*us)
|
||||||
|
delay(2*us)
|
||||||
|
for i in range(100000):
|
||||||
|
self.ttl1.pulse(1*us)
|
||||||
|
delay(1*us)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl1.pulse(2*us)
|
||||||
|
delay(2*us)
|
||||||
|
for i in range(4000):
|
||||||
|
self.ttl1.pulse(5*us)
|
||||||
|
delay(5*us)
|
Loading…
Reference in New Issue