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

16 ビュー (過去 30 日間)
tegan penton
tegan penton 2018 年 11 月 15 日
コメント済み: Walter Roberson 2018 年 11 月 21 日
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

回答 (2 件)

Lipi Vora
Lipi Vora 2018 年 11 月 20 日
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 2018 年 11 月 20 日
編集済み: Walter Roberson 2018 年 11 月 21 日
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 件のコメント
Walter Roberson
Walter Roberson 2018 年 11 月 21 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDigital Input and Output についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by