How to use digital/trigger ports

Every Presto comes with 4 digital outputs and 4 digital inputs.

A pulsed sequence can be triggered either from an internal trigger (by default) or from one of the 4 digital inputs. An instance of TriggerSource class is passed as an argument to the Pulsed.run() function. For example, a sequence can be triggered by a signal on digital input 2:

pls.run(period=1.0, repeat_count=1, num_averages=1, trigger=TriggerSource.DigitalIn2)

Digital triggers/markers can be output at defined times during a pulsed sequence using Pulsed.output_digital_marker(). For example, the following code will output five markers of increasing length every 5 μs on digital output port 1:

length_list = np.linspace(0.5e-6, 2.5e-6, 5)
port = 1  # int or list of ints in [1,4]
T = 0.0
for length in length_list:
   pls.output_digital_marker(T, length, port)
   T += 5e-6

Digital markers have an amplitude of 3.3 V (see the signal captured by the oscilloscope connected to digital output port 1 below) and an output impedance of 50 Ω.

../_images/triggers_light.svg ../_images/triggers_dark.svg