[comp.os.msdos.programmer] Accurate timing request

bangarth@uwovax.uwo.ca (03/07/91)

Researchers here are looking for some facility to measure time with 1 ms. 
or less accuracy on an AT or 386 machine. We currently with our software 
(in Turbo Pascal) can't get any better than about 3 ms. accuracy. I have heard
that there was an article written in a recent tech magazine describing a way
someone has gotten the required accuracy. I know this is vague, but does anyone
know where this is written up, or have a more direct answer? Thanks for your
help. It could save me a lot of library work.

rdippold@maui.qualcomm.com (Ron Dippold) (03/07/91)

In article <1991Mar6.145414.8747@uwovax.uwo.ca> bangarth@uwovax.uwo.ca writes:
>Researchers here are looking for some facility to measure time with 1 ms. 
>or less accuracy on an AT or 386 machine. We currently with our software 
>(in Turbo Pascal) can't get any better than about 3 ms. accuracy. I have heard

I would suggest that you speed up the clock ticks.  Currently they occur
18.2 times a second, but you can speed it up so that they occur 1000 times
a second or more, as the timer is programmable.  Your interrupt routine will
need to scale whatever timer value you use down to the expected value and
pass that on to the old timer.  For example, if you speed up the timer 128
times, you will need to call the old interrupt vector every 128 actual ticks.
You can get some great accuracy this way, just keep in mind that the faster
you interrupt the processor, the more machine power it gobbles up.

mir@opera.chorus.fr (Adam Mirowski) (03/08/91)

In article <1991Mar7.025205.9213@qualcomm.com>, rdippold@maui.qualcomm.com (Ron Dippold) writes:
%% In article <1991Mar6.145414.8747@uwovax.uwo.ca> bangarth@uwovax.uwo.ca writes:
%% >Researchers here are looking for some facility to measure time with 1 ms. 
%% >or less accuracy on an AT or 386 machine. We currently with our software 
%% >(in Turbo Pascal) can't get any better than about 3 ms. accuracy. I have heard
%% 
%% I would suggest that you speed up the clock ticks.  Currently they occur
%% 18.2 times a second, but you can speed it up so that they occur 1000 times
%% a second or more, as the timer is programmable.  Your interrupt routine will
%% need to scale whatever timer value you use down to the expected value and
%% pass that on to the old timer. For example, if you speed up the timer 128
%% times, you will need to call the old interrupt vector every 128 actual ticks.
%% You can get some great accuracy this way, just keep in mind that the faster
%% you interrupt the processor, the more machine power it gobbles up.

On every PC you have a 838ns resolution timer, counting on 16 bits.
When it reaches 0, the standard clock interrupt is called. When you
want a time-stamp, just read both system time and that counter. That
will provide you a very precise value. There is some effort to do in
order to get the lowest overhead and a coherent value, though.

Don't reprogram the timer (so as to get more interrupts), because you
don't need them. You would need to reprogram the timer if you wanted
to periodically poll some I/O port without sitting in a loop, or to get
a more "round" signal for a scheduler, etc.
-- 
Adam Mirowski,  mir@chorus.fr (FRANCE),  tel. +33 (1) 30-64-82-00 or 74
Chorus systemes, 6, av.Gustave Eiffel, 78182 Saint-Quentin-en-Yvelines CEDEX

davem@hpmwtd.HP.COM (Dave McQuate) (03/09/91)

Here's a re-post of a hardware based timer with resolution of ~ 830 nS !!!
It doesn't change the DOS timer interrupt rate, so ordinary time & date are
still good.  I use it and modifications of it a lot.


From cahalan@iris613.gsfc.nasa.gov Mon Oct 30 20:04:09 1989
Relay-Version: version Notes 2.8.2 (with RFA)  87/11/24; site hpmwdjm.HP.COM
From: cahalan@iris613.gsfc.nasa.gov (Robert F. Cahalan)
Date: Tue, 31 Oct 1989 04:04:09 GMT
Date-Received: Tue, 31 Oct 1989 19:31:55 GMT
Subject: v05i034: tctimer, Turbo C millisecond timer
Message-ID: <1022@cirrusl.UUCP>
Organization: Goddard Space Flight Center Climate and Radiation Branch
Path: hpmwdjm!hpnmdla!hpl-opus!hplabs!ucbvax!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!apple!oliveb!tymix!cirrusl!dhesi
Newsgroups: comp.binaries.ibm.pc
Sender: dhesi@cirrusl.UUCP
Followup-to: comp.binaries.ibm.pc.d
Approved: dhesi%cirrusl@oliveb.ATC.olivetti.com
Lines: 483
Summary: tctimer.zoo, Turbo C millisecond timer
X-Submissions-to: ibmpc-binaries%cirrusl@oliveb.ATC.olivetti.com
X-Questions-to: ibmpc-binaries-request%cirrusl@oliveb.ATC.olivetti.com
X-Repost-requests-to: ibmpc-repost%cirrusl@oliveb.ATC.olivetti.com

Checksum:  225051232  (Verify with "brik -cv")
Posting-number: Volume 05, Issue 034
Submitted-by: cahalan@iris613.gsfc.nasa.gov (Robert F. Cahalan)
Archive-name: tctimer/tctimer.uue

I've seen a number of requests lately for a millisecond timer on
ibmpc's.  Here's just the thing, written in TurboC and placed in the
public domain last year.  I've used in on a Toshiba 1000 to redo Shaw's
"dripping faucet" experiment, and reproduced his beautiful fractal
time-time plots at high flow rates, triggering the timer thru the
serial port.

Enjoy!

Robert F. Cahalan              #  Laboratory for Atmospheres
cahalan@iris613.gsfc.nasa.gov  #  NASA-Goddard Space Flight Center
frrfc@scfvm (bitnet)           #  Greenbelt, MD 20771

[
Includes Turbo C source and an executable.  Source contains embedded
assembly code, so you will probably need MASM or TASM or a compatible
assembler.

Checksums obtained with the 4.3BSD "sum" or System V "sum -r" command.

checksum     size (bytes)  file (between BEGIN--cut and END--cut lines)
   50275        27450      tctimer.uue

checksum     size (bytes)  file
   49474        19901      tctimer.zoo

-- R.D.
]

tctimer part01/01
BEGIN--cut here--cut here
begin 644 tctimer.zoo
M6D]/(#$N-3`@07)C:&EV92X:``#<I\3](@```-[___\!!-RGQ/T"`:L$``!?
M````.A(K=?&6W`<``$P$```!````````````=&-T:6UE<BYC````````?PV0
M0"DC*```1Z1Q,X9-'3)E0/`@\V:."S0^&BB0.`*AF8$)J:1I4T:.E#)SWABD
MD^:-&Q`H0<2(D6-&#!PQ7-BP<4.B1#MOTI`!,2:,'#(#P[!!P<;D&1!L6#"L
M(X9-0A5R0-9A0R>%Q#T2$T"52A5$#Q`HB/*`D>('#1DY:.2@B=:&"Q@@5H`M
MZN9,"C8@=,PU>C?%#HE];"K`J1-$&39AX,PI0X8D1Z)&0<RAXY,."Z21)[^!
M<WEITZ=1YTRM>C6K9Z<@Y/R=J"!!SY]!AVJ&`Z*%9,IR+(,P(<>O8*VA1WL%
M&P.&\;<@5*1.`>(%"(T</8(468>DR=6!61/>.3`-2:%I])1QW!'%=JL*L+)&
M^:8ZG#>YQ:"`@0<&C1DLZ,.80<.W`I1AS-$&"&JT0=L<:,!'!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D*E5
MJU^H!N\H8[5ZH7@P!6408+4J!%`0JF:07[7*%B@A8K6JG=Q9(XY:!RL*!S\X
M!#`@5M<J5C`Y!51`!4G0!$7@`MMZAMX*KFS5A`!`!Q(E%``P(S+H?P#`A]\9
MK]QJKN$ZK@!`!4/PK>%:6OO:KS')F2Z9!*XUAE70GG,HB47`67,H!:7%AF:(
MAJZ%!%5P!$5@!2<)`(5XB(DH5E#P!%?PB`!@DBA)B0`PET'PDD]0)I)XLI>8
MB4]06D6`!06+LFEX?T=P6Q.[ERN)LE2P!$RPEP`@F#1KLT;0!"?ICV)E!$(@
M!8750,JH)M+(61,K!$M;6/R:!6V8?T*;6NOGM1)E!&A8!(7%?H))!<,UL58@
M!%60)EA@!$;`!%4P!7AE@@7+5G<+DX?!!&1;6$P@D(>1DD80!(45MW-;MVK2
MDB^9)DRYKR1;!">9DK;%DBX)DQ!K!'IYAXM+!6DR?]_*EZZUE)R;)A>[KWA%
M/4P0!,-U!%`PF*ZU!$*`!#;;!$]@!6E(LZ[EN$.`5WE9EWF2ET4PM%.0!$<0
MF%1P&%:@F(]U!4CP@#0[7`$!W*?$_0(!<TT``$U-```M$S9W0<$J````)@``
M``$```````````!T97-T=&EM92YP<FH```!_3(5`*2,H``#IE)E#ATZ:-F5`
MH*`SQB!".2[0I&B@@*'#,G)`*+1X$&/$%`$!W*?$_0(`````````````````
M````````````````````````````````````````````$@``,*T("```````
+````````````````
`
end
END--cut here--cut here
------------------------------------------------------------

big@vlsi.polymtl.ca (Patrick Drolet) (03/11/91)

In article <1991Mar6.145414.8747@uwovax.uwo.ca> bangarth@uwovax.uwo.ca writes:
>Researchers here are looking for some facility to measure time with 1 ms. 
>or less accuracy on an AT or 386 machine. We currently with our software 
>(in Turbo Pascal) can't get any better than about 3 ms. accuracy. I have heard
>that there was an article written in a recent tech magazine describing a way
>someone has gotten the required accuracy. I know this is vague, but does anyone
>know where this is written up, or have a more direct answer? Thanks for your
>help. It could save me a lot of library work.

I'm afraid I only have half of the answer (since I don't have my Pheonix BIOS
tehc ref near by).  There's an address (in low RAM) that instruct the real-time
clock to generate an interrupt every X milliseconds...  You could take the
actual 55ms to 1 ms, BUT BE CAREFULL!!!  Be sure that no resident software are
hooked on the timer interrupt, and make sure you're using a FAST computer, sincethe overhead of the interrupt, for this purpose, is about .3 and a 386/20

Also remember to tell your prog to reset the timer period to 55 ms after use...


							Patrick Drolet
							big@info.polymtl.ca

P.S.: If you wish to be even more accurate, grad the timer interrupt, but
      don't chain with the old interrupt after use!  The only problem is
      that your real -time might not be good...  Bah!  As long as it does not
      affect CMOS ram, all you have to do is to reboot the computer.

Timothy.Litton@comp.vuw.ac.nz (Tim Litton) (03/14/91)

In article <1991Mar7.025205.9213@qualcomm.com>,
rdippold@maui.qualcomm.com (Ron Dippold) writes:
|> In article <1991Mar6.145414.8747@uwovax.uwo.ca>
|> bangarth@uwovax.uwo.ca writes:
|> >Researchers here are looking for some facility to measure time with
|> 1 ms. 
|> >or less accuracy on an AT or 386 machine. We currently with our
|> software 
|> >(in Turbo Pascal) can't get any better than about 3 ms. accuracy. I
|> have heard
|> 
|> I would suggest that you speed up the clock ticks.  Currently they
|> occur
|> 18.2 times a second, but you can speed it up so that they occur 1000
|> times
|> a second or more, as the timer is programmable.  Your interrupt
|> routine will
|> need to scale whatever timer value you use down to the expected value
|> and
|> pass that on to the old timer.  For example, if you speed up the
|> timer 128
|> times, you will need to call the old interrupt vector every 128
|> actual ticks.
|> You can get some great accuracy this way, just keep in mind that the
|> faster
|> you interrupt the processor, the more machine power it gobbles up.


Don't try this!!!

Your system clock is dependent on that timer, so are most of your I/O
devices for time outs!  Personally, I would put up the +/- 5ms
inaccuracy then try this!



Tim Litton.

rainer@boulder.Colorado.EDU (Rainer Malzbender) (03/14/91)

In article <1991Mar14.040625.13212@comp.vuw.ac.nz> Timothy.Litton@comp.vuw.ac.nz (Tim Litton) writes:
>
>In article <1991Mar7.025205.9213@qualcomm.com>,
>rdippold@maui.qualcomm.com (Ron Dippold) writes:
>|> In article <1991Mar6.145414.8747@uwovax.uwo.ca>
>|> bangarth@uwovax.uwo.ca writes:
>|> >Researchers here are looking for some facility to measure time with
>|> 1 ms. 
...
>
>Don't try this!!!
>
>Your system clock is dependent on that timer, so are most of your I/O
>devices for time outs!  Personally, I would put up the +/- 5ms
>inaccuracy then try this!

Nonsense. You intercept the interrupt vector with your own routine, then
call the regular interrupt once every N times. Everything works, except
you eat up more CPU time handling all the extra interrupts. Basic does
exactly this - it reprograms the timer to interrupt four times faster
in order to produce more accurate timing for sound.
--
Rainer Malzbender PhD   "It's not the bullet that kills you, it's the hole."
Dept. of Physics (303)492-6829                             -Laurie Anderson
U. of Colorado, Boulder         rainer@boulder.colorado.edu 128.138.240.246

frank@cavebbs.gen.nz (Frank van der Hulst) (03/15/91)

In article <1991Mar14.040625.13212@comp.vuw.ac.nz> Timothy.Litton@comp.vuw.ac.nz (Tim Litton) writes:
>
>In article <1991Mar7.025205.9213@qualcomm.com>,
>rdippold@maui.qualcomm.com (Ron Dippold) writes:
>|> In article <1991Mar6.145414.8747@uwovax.uwo.ca>
>|> bangarth@uwovax.uwo.ca writes:
>|> >Researchers here are looking for some facility to measure time with
>|> 1 ms. 
>|> >or less accuracy on an AT or 386 machine. We currently with our
>|> software 
>|> >(in Turbo Pascal) can't get any better than about 3 ms. accuracy. I
>|> have heard
>|> 
>|> I would suggest that you speed up the clock ticks.  Currently they
>|> occur
>|> 18.2 times a second, but you can speed it up so that they occur 1000
>|> times
>|> a second or more, as the timer is programmable.  Your interrupt
>|> routine will
>|> need to scale whatever timer value you use down to the expected value
>|> and
>|> pass that on to the old timer.  For example, if you speed up the
>|> timer 128
>|> times, you will need to call the old interrupt vector every 128
>|> actual ticks.
>|> You can get some great accuracy this way, just keep in mind that the
>|> faster
>|> you interrupt the processor, the more machine power it gobbles up.
>
>
>Don't try this!!!
>
>Your system clock is dependent on that timer, so are most of your I/O
>devices for time outs!  Personally, I would put up the +/- 5ms
>inaccuracy then try this!
>
I've done this very successfully (although only to get 3ms accuracy on an XT).
I simply sped up the interrupt by a factor of 16, then called the original
vector (from my new vector) once every 16 interrupts. Before my program exits,
it reset the tick interval, and restores the vector.

Therefore the RTC keeps getting called at the usual 18.2Hz.

I think you may be confused -- we're talking about changing, through software,
the frequency of interrupts coming into IRQ0 (interrupt 8 on the CPU). This
won't affect the clocking of signals on the bus, which is what "system clock"
implies to me.

Secondly, the only I/O device time-out controlled by the INT8 service routine
is the floppy disk. If that ISR isn't called, all that will happen is that the
floppy will continue to spin. That can be turned off by outputting a byte to
the appropriate port, if necessary..>

Frank.
>
-- 

Take a walk on the wild side, and I don't mean the Milford Track.

rdippold@maui.qualcomm.com (Ron Dippold) (03/15/91)

In article <1991Mar14.040625.13212@comp.vuw.ac.nz> Timothy.Litton@comp.vuw.ac.nz (Tim Litton) writes:
>
>In article <1991Mar7.025205.9213@qualcomm.com>,
>rdippold@maui.qualcomm.com (Ron Dippold) writes:
>|> I would suggest that you speed up the clock ticks.  Currently they
>|> occur
>|> 18.2 times a second, but you can speed it up so that they occur 1000
>|> times
>|> a second or more, as the timer is programmable.  Your interrupt
>|> routine will
>|> need to scale whatever timer value you use down to the expected value
>|> and
>|> pass that on to the old timer.  For example, if you speed up the
>|> timer 128
>|> times, you will need to call the old interrupt vector every 128
>|> actual ticks.
>|> You can get some great accuracy this way, just keep in mind that the
>|> faster
>|> you interrupt the processor, the more machine power it gobbles up.
>
>
>Don't try this!!!
>
>Your system clock is dependent on that timer, so are most of your I/O
>devices for time outs!  Personally, I would put up the +/- 5ms
>inaccuracy then try this!

Look, I _said_ that you should step down the ticks that you get so that you
continue to call the old timer interrupt at the same rate.  I have been
using this method for years without problems.  The only caveat is that if
you exit without restoring the old interrupt, you could be in trouble.

rkl@cbnewsh.att.com (kevin.laux) (03/15/91)

In article <1991Mar14.202729.7884@qualcomm.com>, rdippold@maui.qualcomm.com (Ron Dippold) writes:
> In article <1991Mar14.040625.13212@comp.vuw.ac.nz> Timothy.Litton@comp.vuw.ac.nz (Tim Litton) writes:
	<clock tick debate deleted>

	I've been following this thread for a bit.  At this time I'd like
to point out that for AT's and most PS/2's with a Real-time clock there are
two services available for timing.  They are Int 15h Function 83h and 86h,
Event Wait and Delay, respectively.  Event Wait will set the high order bit
in a byte flag when the interval expires, while Delay will pause until the
interval expires.  The timing is accurate to 976 microseconds but with
Int 70h it's more like 1 millisecond.

	Event Wait

	AH:	83h
	AL:	00h	Set Interval
		01h	Cancel Interval
	CX:		High order microseconds word
	DX:		Low order microseconds word
	ES:BX		Pointer to flag byte that gets high order bit set
			as soon as possible after end of interval

	Carry Flag clear if successful
	Carry Flag set if error	(Timer already running / function not supported)
	AL:	80h	PC
		86h	XT, AT

	Delay

	AH:	86h
	CX:		High order microseconds word
	DX:		Low order microseconds word

	Carry Flag clear if successful
	Carry Flag set if error	(Timer already running / function not supported)

-- 
________________________________________________________________________________
	R. Kevin Laux				Email: rkl1@hound.att.com
	AT&T Bell Labs				Voice: (908) 949-1160
	Holmdel, NJ 07733			Fax:   (908) 949-0959