Dear Cohen,
I recently had to synchronize the biosemi with a PC with no specific event or stimuli presented on the PC. For this purpose I made a short program that sends every second a trigger on the parrallel port connected to the Biosemi USB box. Using the following formula I can then compute the PC time at which the trigger was sent:
approaxPCTimeTrigger = (timeBeforeTrigger + timeAfterTrigger) / 2
Since the trigger is also present in the BDF file I can associate any PC times to a BDF sample and vice versa. Since the PC and Biosemi clock are different I was expecting to observe a drift from the beginning of the experiment to the end (for instance the PC could count the time more slowly than the Biosemi). This is indeed what I observed: the number of seconds elapsed from the beginning of the experiment to the end differed by 0 to 20 milliseconds in one direction or another (approax 45 minutes of experiment). I checked and the drift is linear. As I said I find a linear drift completly normal. What I do not understand is why it differs from a recording to another: sometimes nearly 0 drift and sometime a difference of 20 milliseconds in the end. All the recordings were done on the same PC but on different days and thus different boots.
My questions:
- do you know if the clock of a PC behaves differently from a boot to another ?
- if I want to asign a time to the signals should I better trust the Biosemi (counted as number_of_samples / sampling_frequency) or the PC time ?
As always a great thanks for your help,
Guillaume
Synchronization with PC
-
- Site Admin
- Posts: 1152
- Joined: Fri Mar 26, 2004 7:00 pm
- Location: Amsterdam, Netherlands
- Contact:
Re: Synchronization with PC
Both the PC and AD-box clock are crystal based (with similar stability and accuracy of the crystals). The temperature variations in a PC are larger than in the AD-box, so you can expect the AD-box clock to run more constant. Given the temperature variations in a PC, and the difficulties of controlling trigger output timing accurately in a Windows PC, I would not be surprised if you can also see jitter and non-linear drifts.
Always use the ActiveTwo samples as your time reference, and as your reference for trigger timing.
Best regards, Coen (BioSemi)
Always use the ActiveTwo samples as your time reference, and as your reference for trigger timing.
Best regards, Coen (BioSemi)