MATLAB: Sending a TTL pulse with RS232

serialttl

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 ?

Best Answer

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
Related Question