Hello all,
I am a PhD student from Granada (Spain) who has recently started using artiq on a Kasli LUH that Prof. Ospelkaus kindly sent us to get started. I've started with the examples, of course, and I am having trouble with the bidirectional TTL channels. In particular, the rtio.py example described in the documentation does nothing when using one of the bidirectional TTLs. I refer to the one shown here:
from artiq.experiment import *
class Tutorial(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("ttl0")
@kernel
def run(self):
self.core.reset()
self.ttl0.output()
for i in range(1000000):
delay(2*us)
self.ttl0.pulse(2*us)
This example works well with the output-only TTL channels. Since the channel is explicitly set to output mode, I don't really know what could be the issue. Input mode does work; for example, the following code results in a pulse train when a suitable signal is applied to ttl0:
from artiq.experiment import *
class Tutorial(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("ttl7")
self.setattr_device("ttl0")
@kernel
def run(self):
self.core.reset()
self.ttl7.output()
if self.ttl0.count(self.ttl0.gate_rising(500*us)) > 20:
detecta=True
else:
detecta=False
delay(10*ms)
if detecta:
for i in range(100):
self.ttl7.pulse(10*ms)
delay(10*ms)
else:
print("Try again")
I am using the device_db.py file from the artiq GitHub repository in the artiq/examples/kasli_basic/ folder, in case this is relevant.
Does anyone have a suggestion on how to proceed from here?
Best,
Manu GutiƩrrez