Searching \ for 'Interval' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=interval
Search entire site for: 'Interval'.

Truncated match.
PICList Thread
'Interval'
1998\03\07@102034 by Christoph Klein

flavicon
face
Dear PicListers,

I would like to measure time intervals which are presented to
a Pic16C84 (possibly) as short TTL-compatible spikes.
Supposing that measuring the interval would be the pic's only task:

What would be the best time resolution I could expect using a
4 MHz pic with a Xtal?

And how about accuracy?

Is there a chance to measure with a resolution in the msec range or
isn't there?
I haven't got a clue ...

Christoph

1998\03\07@151256 by Andrew Warren

face
flavicon
face
Christoph Klein <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:

> I would like to measure time intervals which are presented to
> a Pic16C84 (possibly) as short TTL-compatible spikes.
> Supposing that measuring the interval would be the pic's only task:
>
> What would be the best time resolution I could expect using a
> 4 MHz pic with a Xtal?
>
> And how about accuracy?
>
> Is there a chance to measure with a resolution in the msec range or
> isn't there? I haven't got a clue ...

Christoph:

Millisecond resolution is no problem whatsoever... In fact, you can
measure the intervals to a resolution of better then 5 microseconds
at 4 MHz, with fewer than a dozen lines of code.

Accuracy will be dependent upon the precision and stability of your
crystal, but even the cheapest crystals will give you better than
0.01% accuracy.

-Andy

=== Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1998\03\07@151303 by Gavin Jackson

flavicon
face
part 0 723 bytes
Gavin
--------------------------
vulcanspamKILLspamihug.co.nz
www.geocities.com/TheTropics/Cabana/2625
--------------------------


{Original Message removed}

1998\03\07@235045 by Nicholas Uloth

flavicon
face
At 12:10 PM 3/7/98 -0800, you wrote:
{Quote hidden}

Note that the crystal stability and accuracy is the more important issue if
you want to measure "real" microseconds. In that case a 0.01% crystal will
limit you to +/-1 milisecond accuracy.

If on the othwer hand you are doing relative measurements and the temperature
of your device dosent fluctuate wildly then you can measure realative times
down to an accuracy of a few microseconds.

This is another example of where measutring absolute values is a pain but
relative
values are relatively easy. To get real accuracy down to microseconds requires
a bit more then a pic and a XTL.





Nicholas Uloth
Industrial Software Partners Ltd
6 The Promenade
Mt Pleasant, Perth, WA 6153
Australia
ph: xxx-618-93647181
fax: xxx-618-9481-7202
email: EraseMEniculothspam_OUTspamTakeThisOuTiohk.com
       niculothspamspam_OUThotmail.com

1998\03\08@175009 by Russell McMahon

picon face
If my brain is working correctly (some may challenge this
:-)) the comment about accuracies of microseconds absolute
resolution not being obtainable with a 0.01% crystal is
incorrect. Maybe I am misunderstanding what is being meant
by "absolute" and "relative" here.

The spec of eg +/- 0.01% is probably for medium to long term
frequency accuracy or untrimmed frequency of operation.
Precisely what you can expect from a crystal will be spelt
out in the manufacturers specs. However, I believe that you
can expect even a cheap and cheerful crystal to provide much
greater accuracy over short to medium periods. What this
means is that if it is running say .005% fast the absolute
measure of time will be short by this percentage but if you
are measuring periods of microseconds to a few seconds then
the oscillator will not drift substantially during this
period so that the absolute error will be close to the
oscillator error at the start of the measurement period (or
at the end which should be about the same). If however the
oscillator did in fact drift fully from +0.01% to -0.01%
over your measurement period then the preceding would not
apply.

On this basis a measurement of apparently "exactly" 1000
microseconds could be as much as +/- 0.1 microsecond out for
0.01% longer term error but approx 0% short term error - ie
below the quantisation error caused by PIC instruction
cycles. For shorter periods the error becomes even less
visible.



{Original Message removed}

1998\03\09@053142 by Shepherd Rudie

flavicon
face
Hi Christoph,

Running a 8MHz crytal will give you double the resolution. You could
also use an interrupt to start the timer and another to stop it (by
changing the interrupt level on one of the pins.) I think there's some
examples in the App Notes.

I use PicBasic and the resolution with the "built-in" pulse measurement
routine is 10 microseconds on a 4 Mhz crystal. This is really easy to do
with PicBasic - a simple command measures the pulse and puts the result
into a variable.

Rudie Shepherd

> {Original Message removed}

1998\03\09@115159 by Nicholas Uloth

flavicon
face
At 12:10 PM 3/7/98 -0800, you wrote:
{Quote hidden}

Note that the crystal stability and accuracy is the more important issue if
you want to measure "real" microseconds. In that case a 0.01% crystal will
limit you to +/-1 milisecond accuracy.

If on the othwer hand you are doing relative measurements and the temperature
of your device dosent fluctuate wildly then you can measure realative times
down to an accuracy of a few microseconds.

This is another example of where measutring absolute values is a pain but
relative
values are relatively easy. To get real accuracy down to microseconds requires
a bit more then a pic and a XTL.





Nicholas Uloth
Industrial Software Partners Ltd
6 The Promenade
Mt Pleasant, Perth, WA 6153
Australia
ph: xxx-618-93647181
fax: xxx-618-9481-7202
email: KILLspamniculothKILLspamspamiohk.com
       RemoveMEniculothTakeThisOuTspamhotmail.com

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...