中国医学工程2025,Vol.33Issue(9):1-8,8.DOI:10.19338/j.issn.1672-2019.2025.09.001
同步信号在串口和并口中时间性能的差异研究
Difference in time performance of synchronization signals in serial port and parallel port
摘要
Abstract
[Objective]Response latency representing the time interval between the onset of stimulus and the response,and is a critical parameter in studying human behavior.However,different time across devices may introduce errors,reducing the reliability of response latency.Serial port or parallel port synchronization signals can mitigate this.However,there may be differences in the timing performance of serial port and parallel port synchronization signals,which could introduce additional errors and affect the validity and repeatability of response latency.This study aims to compare the time errors and timing accuracy of serial port and parallel port synchronization signals and explore the potential impact of these differences on experimental design.[Methods]Visual stimuli and serial port and parallel port synchronization signals were generated using Psychopy,Psychtoolbox,E-prime,and OpenSesame.A logic analyzer simultaneously measured the synchronization signals and visual stimuli.The difference between the onset of the visual stimulus and the onset of the synchronization signal represents the time error;the stability of the synchronization signal's period reflects the timing accuracy.[Results]Under Psychtoolbox and Psychopy,the time error of serial port and parallel port synchronization signals was similar and significantly better than E-prime and OpenSesame.The time error of the synchronization signal under Psychotoolbox is-2.68~-6.08 ms for serial port and-3.17~-6.23 ms for parallel port.The time error of the synchronization signal under Psychopy is-2.02~-6.03 ms for serial port and-2.26~-6.04 ms for parallel port.In Psychopy,serial port synchronization signals showed better timing accuracy with SD=0.35 ms,Range=34.47 ms,while in Psychtoolbox,parallel port synchronization signals had better timing accuracy with SD=0.19 ms,Range=2.77 ms.Additionally,synchronization signals on Linux showed better timing accuracy,while synchronization signals on Windows showed better time error performance.[Conclusion]There are significant differences in the time performance of serial port and parallel port synchronization signals,which in turn affect the validity and repeatability of response latency.When designing high-precision experiments,it is important to fully consider the time performance differences between the two,and optimize experimental setup accordingly.This study provides valuable reference for optimizing experimental design and improving the effectiveness and repeatability of response latency.Although only visual stimuli are involved,the methods and results can still serve as a reference.关键词
反应潜伏期/同步信号/视觉刺激/时序Key words
response latency/synchronization signal/visual stimulation/timing分类
信息技术与安全科学引用本文复制引用
陈彪..同步信号在串口和并口中时间性能的差异研究[J].中国医学工程,2025,33(9):1-8,8.基金项目
安徽省高校自然科学研究项目(KJ2020ZD16) (KJ2020ZD16)