Sending a TTL pulse with RS232

14 views (last 30 days)
Hello, I would like to send a trigger to a Biopac device,by sending a pulse with a RS232 connection. I understand that the RS232 is not the best way to do it but,I know that we can use the RTS/DTR pin for this . I'm also using the psychtoolbox, how would you proceed to do it ?

Accepted Answer

Walter Roberson
Walter Roberson on 4 Nov 2015
RS232 RTS/DTR cannot be used for TTL levels without some conversion. TTL levels are 0 to +0.8V for low but RS232 is -25V to -3V for low. TTL is +2V to +5V for high, whereas RS232 is +3V to +25V, so you might get lucky and have output in the +3V to +5V but you cannot generally be sure without specifications of the IC.
For how to change the DTR status in MATLAB see https://www.mathworks.com/matlabcentral/newsreader/view_thread/166351
  2 Comments
Pat
Pat on 4 Nov 2015
Hi walter, the signal will be converted using a line receiver, so I will be able to send a TTL through the RS232. I wanted to know how to set the pin in order to send the pulse ?
Walter Roberson
Walter Roberson on 4 Nov 2015
See the thread I linked to. You can turn the DTR state on and off.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!