My goal is to read digital information (e.g. a phase I have measured in a different setup as a 16 bit number) with ARTIQ during an realtime sequence and change behaviour in the sequence based on that information (in this example adjust the phase of an Urukul channel). So far I have two options in mind which seem both like a workaround:
- Convert the digital signal into an analog signal with a DAC and read the analog signal with Sampler. This should work, but means that I convert digital->analog->digital, which feels very unnecessary.
- Read the digital signal directly on a TTL line from a serial connection and convert the bit sequence by hand based on the pattern received. This circumvents the problem of intermediate analog conversion, but I have to manually trigger the bits correctly and do the back-conversion into a number by hand.
Is there another option that is more direct and/or preferred? Is the SPI module mentioned in the documentation (https://m-labs.hk/artiq/manual/core_drivers_reference.html#module-artiq.coredevice.spi2) the correct tool for this job? If yes, how does the RTIO integration work (there is a mention of realtime buses as well) and how do I send data to the SPI interface (only via a Eurocard connector or is there another interface as well)?