Effacer les filtres
Effacer les filtres

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

10 vues (au cours des 30 derniers jours)
tegan penton
tegan penton le 15 Nov 2018
Commenté : Walter Roberson le 21 Nov 2018
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

Réponses (2)

Lipi Vora
Lipi Vora le 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 le 20 Nov 2018
Modifié(e) : Walter Roberson le 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 .
  2 commentaires
Walter Roberson
Walter Roberson le 21 Nov 2018
WIth respect to the VGA connector, in theory you might be able to arrange something using the I2C lines; http://www.righto.com/2018/03/reading-vga-monitors-configuration-data.html . There would not be any MATLAB support for this, and it would not be a TTL pulse.

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by