Hi All,
Im using a USB2TTL8 device (LabHackers Research Equipment : USB2TTL8 Adapter) to send TTL triggers to our EEG amp. This works fine when using matlabs serial and serialport functions, but IOPort wont generate a trigger. Calling ‘OpenSerialPort’ is successful, but the call to ‘Write’ doesn’t produce a trigger. This is using Matlab 2021b on a windows 10. An example of the PTB code I’ve used is below. For context, the text string sent to the ttl device has format of ‘WRITE value [duration] [next_value]\n’
Any help would be greatly appreciated.
Cheers
params = 'BaudRate=128000 DTR=1 Terminator=10'
[com err] = IOPort('OpenSerialPort', 'COM5', params)
IOPort('Write', com, 'WRITE 10 200 0\n')
IOPort('Close', com)