fast monitor or complex stimuli), then this should help… If you need to send triggers in a PTB drawing loop and you don’t have much overhead (i.e. However, IOPort is still much faster than either MATLAB option, I was quite surprised as normally you cannot achieve such fast command-response times with USB devices (the Seeduino Xiao is faster than an Arduino Uno and uses USB 3). The new serialport is clearly faster than the old one, and the variance is considerably lower. I also used a simplistic method to generate a 1ms TTL using digitalWrite(1) WaitSecs(0.001) digitalWrite(0) to see how close to 1ms we got: Serial I used an oscilloscope to ensure the output signal was well formed, and used its measurement function to measure average rise-time widths. t = tic įprintf('It took %.4f seconds for 10,000 iterations\n',toc(t)) I used the legacy MATLAB arduino interface sketch, which receives and sends the data via USB serial commands. In addition I also compared IOPort, the PTB serial controller.įor the test I basically toggled the state of a digital pin on a Seeduino Xiao as fast as possible. So I was curious to compare the old and new interfaces. Some of my arduino control code had previously used the serial command that MATLAB has now deprecated. MATLAB has a fairly new (R2019B+) serial port interface, Serialport.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |