Can matlab receive a ttl pulse through a VGA port/Mini D-sub 15-pin or USB port?

18 views (last 30 days)
Hello,
I am trying to send a ttl pulse from a parallel port on one computer to be received by a laptop. Is it possible for matlab to receive a ttl pulse through a VGA port/Mini D-sub 15-pin or USB port?
We are trying to trigger multiple pieces of equipment at once so will be using a parallel port to multiple BNC cable. We were then hoping to connect the BNC cable to the laptop somehow (via the VGA or USB port maybe) to start/stop a function in matlab.
Thank you for your time.
Tegan

Answers (2)

Lipi Vora
Lipi Vora on 20 Nov 2018
Could you give a detailed explanation of your workflow? Also, there seems to be a laptop and a computer, is one of them used to generate the signal?
MATLAB provides the ICT and DAQ toolboxes that can be used to communicate serially with hardware:

Walter Roberson
Walter Roberson on 20 Nov 2018
Edited: Walter Roberson on 21 Nov 2018
if you could use a parallel port then see http://apps.usd.edu/coglab/psyc770/IO64.html
For vga it would get messy such as cheating on vertical retrace interrupt. low level code would be required to configure it all. Matlab does not provide any solution in current versions that I can think of at the moment . In releases that supported legacy daq there was more room for custom interfaces .
usb is a "NO".
usb is strictly serial and unable to handle pulses ( unless perhaps via usb 3.0 support for interruptions ).
For usb it would be easier to use a ttl to USB device but most of those are ill equipped to handle pulses .
might even be easier to usb to serial with a pulldown on cts but I wouldn't recommend that .
this might be a job to toss in an arduino or raspberry but I think latency would exceed permissible .

Tags

Community Treasure Hunt

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

Start Hunting!