Invert TTL signal?

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Invert TTL signal?
#1
I want to turn off an LED during one state and I would like to know if there is any way to invert the TTL:  i.e., have one of the "TTL out" always high, and then trigger a switch to low (off) during a state.  Is there any easy way in the code to invert the TTL?

Thanks!
Reply
#2
Hi Els,

In any state where you want the line to remain high, add
{'BNC1', 1} to the OutputActions section of the state description (assuming it's BNC output channel 1 you're using). For an LED, use {'PWM1', 255}
In that state where you want an inverted pulse, you can omit this - all lines are low and LEDs are off by default.
The line will go low during the inter-trial interval, while the next state machine is being prepared. If you use TrialManager to write your protocol, you can limit the off time to ~200 microseconds.

-Josh
Reply
#3
(01-27-2020, 04:19 PM)Josh Wrote: Hi Els,

In any state where you want the line to remain high, add
{'BNC1', 1} to the OutputActions section of the state description (assuming it's BNC output channel 1 you're using). For an LED, use {'PWM1', 255}
In that state where you want an inverted pulse, you can omit this - all lines are low and LEDs are off by default.
The line will go low during the inter-trial interval, while the next state machine is being prepared. If you use TrialManager to write your protocol, you can limit the off time to ~200 microseconds.

-Josh

Josh, 

Thanks for the prompt reply!  This is what I had been doing, but there was a visible pause in the light between trials, but I wasn't aware of TrialManager.  I'll give it a go and see if it reduces the off time in my protocol.

Thanks!

Emily
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)