- Edited
I was testing the bidirectional TTL on my variant. When I set ttl0
to input mode, everything worked as expected. However, when I switched it to output mode and attempted to generate pulses, the signal remained at a low voltage without any change. Here’s my test code.
from artiq.experiment import *
from artiq.coredevice import core, ttl
def print_underflow():
print("RTIO underflow occured")
class Test_TTL_InOut_Switch(EnvExperiment):
def build(self):
pass
def prepare(self):
self.core: core.Core = self.get_device("core")
self.output_ttl: ttl.TTLInOut = self.get_device("ttl0")
@kernel
def run(self):
self.core.reset()
self.core.break_realtime()
self.output_ttl.output()
delay(1*ms)
num = 3000
try:
while True:
self.output_ttl.pulse(num*ns)
delay(num*ns)
except RTIOUnderflow:
print_underflow()
For a simpler test, I tried using self.ttl0.on()
to keep the output at high voltage state. While on the moninj
dock it showed that the mode changed to "OUT" and the state switched to "1", there's still not any actual signal change on the oscilloscope. I'm sure that the issue is not with the oscilloscope. The firmware and gateware version is 8.8974+b504c5a and software version is 8.8968+2c26199.