This documentation supports the latest PCIe host firmware, the latest OpenEphys.Onix1 package, and Bonsai 2.9+.

Table of Contents

Headstage 64 Optical Stimulation

The following excerpt from the Headstage64 example workflow demonstrates optical stimulation by triggering a train of pulses following a press of the ◯ key on the breakout board.

/workflows/hardware/hs64/ostim.bonsai workflow

The DigitalInput operator generates a sequence of DigitalInputDataFrames. Although the digital inputs are sampled at 4 Mhz, these data frames are only emitted when the port status changes (i.e., when a pin, button, or switch is toggled) when DigitalInput's SampleRate property is left blank such as is done in the example workflow. The DigitalInput's DeviceName property is set to "BreakoutBoard/DigitalInput". This links the DigitalInput operator to the corresponding configuration operator.

Buttons is selected from the DigitalInputDataFrame and passed to a HasFlags operator, which filters the sequence based on which button is pressed using the Value property's dropdown menu. In this case, HasFlags's Value is set to "Circle", so its output is "True" when an item its input sequence contains a "Circle" flag. The DistinctUntilChanged operator only passes an item in its input sequence if it's different from the previous item in the input sequence. When the Headstage64OpticalStimulatorTrigger operator receives a "True" value in its input sequence, a stimulus waveform is triggered.