# Sending trigger and event markers via USB port

**URL:** <https://psychtoolbox.discourse.group/t/sending-trigger-and-event-markers-via-usb-port/4653>\
**Category:** Programming Help\
**Tags:** windows, experiment-design, matlab, timing\
**Created:** [October 16, 2022, 4:07pm UTC](https://psychtoolbox.discourse.group/t/sending-trigger-and-event-markers-via-usb-port/4653 "2022-10-16T16:07:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ian-Max-Andolina](https://yyz2.discourse-cdn.com/free1/user_avatar/psychtoolbox.discourse.group/ian-max-andolina/32/4_2.png) [@Ian-Max-Andolina](https://psychtoolbox.discourse.group/u/Ian-Max-Andolina)\
**Post date:** [October 17, 2022, 5:05am UTC](https://psychtoolbox.discourse.group/t/sending-trigger-and-event-markers-via-usb-port/4653/2 "2022-10-17T05:05:56Z")

</div>

See your other post for the best answers by @xiangrui and @mariokleiner[DAQ Device for EEG-Task experiment set up](https://psychtoolbox.discourse.group/t/daq-device-for-eeg-task-experiment-set-up/4648)

The problem you will have is how will you configure this cable to do what you want It is just a generic USB-to-serial, and while PTB’s IOPort will be able to open it, you will need to know which pins are required for your device. For TTLs, from what I remember, IOPort needs to send ‘DTR=1’ or ‘DTR=0’ to toggle the data-ready-line as a pseudo-TTL. But if you want event markers, you would normally send a strobed word which a serial port is not designed to do (unless you know your amp specifically supports the serial protocol [which I heavily doubt], not just uses a 9-pin plug).

---

_[View the full topic](https://psychtoolbox.discourse.group/t/sending-trigger-and-event-markers-via-usb-port/4653)._
