Hi,
We have received a system which we predomenantly want to use DIOs as outputs, however the card has shipped with
{
"type": "dio",
"ports": [2],
"bank_direction_low": "input",
"bank_direction_high": "input",
"edge_counter": true
}
And all the direction switches are in the OFF position, which I believe corresponds to using the TTLInOut class.
My questions are:
1) what does
"bank_direction_low": "input",
"bank_direction_high": "input",
Actually mean? I can't find any statement in the documentation.
I can imagine it's either referring to the lower bank of TTLs visually on the panel being set to input/output (But does this actually correspond to TTLInOut vs TTLOut, in which case the names are confusing)
OR
that the setting of
self.ttl.input()
self.ttl.output()
maps onto 'bank_direction_low' and 'bank_direction_high'?
I ask this because my test program
from artiq.experiment import *
class TTL_Output_On_Off_Pulse(EnvExperiment):
"""TTL Output On, Off, Pulse"""
def build(self):
self.setattr_device("core")
self.setattr_device("ttl0")
@kernel
def run(self):
self.core.reset()
self.ttl0.output()
delay(1 * us)
self.ttl0.on()
delay(5 * ms)
self.ttl0.off()
Doesn't work, and I don't see the front face LEDs changing to the output mode, nor a voltage on the TTL0. They all just float at around 1V.
2) My second question relates to the termination switches effect in output mode.
If I understand correctly, does this switch just put a 50Ohm resistor in series with the line?
In which case, when outputting to a High-z load, will this back terminate the reflection when in the 50Ohm setting?
I.e. when outputting to a High-Z load, you should put the 50Ohm setting,
and when outputting to a 50 Ohm load, you should put the High-Z setting?
3) This somewhat depends on the answers to the above questions, but is there any benefit of setting the card to output only mode, as opposed to setting the TTLInOut to output via I2C? It seems this gives more flexibility with setup, but at what cost?
I am likely to reflash the controllers but I'd like to know what I should set ideally given out requirements.
Thank you all for your knowledge and help!
Cheers,
Tom