Nano second accuracy

Nano second accuracy

Post by Sathish Kuma » Sat, 05 Jan 2002 02:05:18



     Hi everyone,

     New year greetings to all of you out there.

     Can someone tell me how to achieve nano or micro second timing
     under DOS with C or assembly. (Turboc or TASM/MASM/NASM)

     The standard timer ticks at 182 times in 10 secs which gives me
     a resolution of only around 55ms.

     Any code fragment would be greatly appreciated.
     Please help.

     Thanx in advance.

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

Nano second accuracy

Post by m.. » Sat, 05 Jan 2002 04:47:22


Read the 8254 timer ticks directly from port 0x40.   That can
get you about 1 us.    You can be a little better (maybe 0.1 us
or so) by using dedidcated timer cards.  

If you want nanosecond timing, well, keep dreaming... ;-)


>      Hi everyone,
>      New year greetings to all of you out there.
>      Can someone tell me how to achieve nano or micro second timing
>      under DOS with C or assembly. (Turboc or TASM/MASM/NASM)
>      The standard timer ticks at 182 times in 10 secs which gives me
>      a resolution of only around 55ms.
>      Any code fragment would be greatly appreciated.
>      Please help.
>      Thanx in advance.


 
 
 

Nano second accuracy

Post by Dr John Stockto » Sat, 05 Jan 2002 05:59:17





Quote:>     Can someone tell me how to achieve nano or micro second timing
>     under DOS with C or assembly. (Turboc or TASM/MASM/NASM)

>     The standard timer ticks at 182 times in 10 secs which gives me
>     a resolution of only around 55ms.

Read Kris Heidenstrom's The Timing FAQ:
 358631 Feb 1 1996 ftp://garbo.uwasa.fi/pc/programming/pctim003.zip
 pctim003.zip Timing on the PC under MS-DOS, K.Heidenstrom

also ftp://ftp.simtel.net/pub/simtelnet/msdos/info/pctim003.zip  ?

--

 <URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
 <URL: http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ;
 <URL: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.

 
 
 

Nano second accuracy

Post by Les Cargil » Sat, 05 Jan 2002 11:33:41



>      Hi everyone,

>      New year greetings to all of you out there.

>      Can someone tell me how to achieve nano or micro second timing
>      under DOS with C or assembly. (Turboc or TASM/MASM/NASM)

You'll need additional hardware support do get much under 1 ms.

Check Embedded Systems Journal or Dr. Dobbs for third-party data
collection hardware kits.

Quote:>      The standard timer ticks at 182 times in 10 secs which gives me
>      a resolution of only around 55ms.

>      Any code fragment would be greatly appreciated.
>      Please help.

>      Thanx in advance.

> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

--
http://home.att.net/~lcargill