phk at phk.freebsd.dk
Mon Jul 25 06:40:35 EDT 2005
In message <039201c59100$dbbea8a0$66fea8c0 at antecp4>, "Joseph Gray" writes:
>I was thinking about using Clicktime http://www.realhamradio.com/network.htm
>in a little experiment, here at home. The program is supposed to pulse the
>DTR of the selected COM port on a Windows PC at one second intervals. Since
>the program must take a finite amount of time to execute the instructions to
>trigger the DTR line and then there would also be a delay through the serial
>hardware, there must be a delay between the actual start of each second and
>the time the DTR line triggers.
>How can I measure this, so that I can subtract it from my measurements?
>Assume I don't have access to fancy software debuggers or logic analysers.
Then you can't measure it, and it is even tricky to do so with fancy
The problem is pretty deep once you start to think about it: the
computers notion of time is tied to an internal counter and unless
you can eletrically get hold of that counter and measure that relative
to some external reference, you have no idea how close the CPU's
concept of time is the the real UTC/TAI time.
Once you have measured that, measuring the DTR pin relative to
the same external reference is trivial and then your answer is
a simple subtraction.
You can see some discussion about this problem in my timecounter
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the time-nuts