Use an input pin in logic analyzer to trigger two output signals

Hi, currently I am using Python Moku API to operate logic analyzer in my Moku go device. In the project I would like to set one of the digital pins (let say pin1) as input pin. Whenever there is a trigger signal from an external source to pin1, I would like to send out two trigger signals from another two pins (let say pin2 and pin3) at the same time to my another two instruments, so that these two instruments can receive these two signals and be set to on at the same time. Is there any features in the logical analyzer which allows me to do this? So far I use get_data in a while loop to keep checking if the pin1 has an input signal (1 or 0) from the external source, if yes, then I set the pin2 and pin3 on by using set_pins (set override =‘H’); if not, then set them off using set_pins as well (set override =‘L’). This solution does not work quite well, because it takes time to use get_data and check if i receive any signal from pin1 (we want to know if the input signal exists more or less the same time as it is sent out from the external source). In addition, it seems like if i use set_pins to send the outout signals from moku go (set override either to H or L), the signals are sent out sequentially (so pin2 first and then pin3, or the other way around). But we want the signals sent out at the same time to these two instruments.

Thanks for the great help in advance and hope to get some input from this! Thanks!

Hi @waiforway ,

I feel this request is similar to one Knowledge Base I have written. That code re-generate three triggers with 320 ns separations. Could you please check the section 3 in the following link?

Thank you,
Hank

Hi hanklong!

Yes I am aware of this article. Would you mind provide some more information on how to do it in Python? My feeling is that using set_pins is still slower than using the Moku software directly. Moreover, the set_pins does not allow me to turn more than one pin on and off at the same time (it executes one after another). Also, there is warning whenever I use set_pins. It suggests me to use set_pin_mode instead. But in set_pin_mode I cannot adjust the signal to 0 or 1, it only allows me to set X, I, PG1 or PG2. More help would be appreciate!! Thanks in advance.

Hi @waiforway ,

This is VHDL codes (hardware description language) which runs in real time on FPGA. Neither of Moku app or Python could do what you needed because they are way too slow than FPGA.

This is a introduction of VHDL codes:

This is the Moku Cloud Compile introduction:

This is the Moku Cloud Compile which could help you to generate the bitstreams files.

https://compile.liquidinstruments.com/

Thank you,
Hank