piclist 2001\02\23\132647a >
Thread: Frequency counting
www.piclist.com/techref/microchip/time.htm?key=count
flavicon
face BY : Dan Michaels email (remove spam text)



Brusque wrote:

>    What do you think of about my routine?
>

Your routine looks interesting, but I was wondering whether
the interrupt and other overhead - due to using C - may be
producing your incorrect answers. All of your answers are
on the low side, meaning the timing took slightly too long.

In my timer/counter routines, I always use assembler, because
then I know exactly how many clock cycles everything takes,
and still the overhead is sometimes a problem - but then my routines
use timer1 to measure up to 60 Mhz.

Using (float)casting, I guess round-off errors during division
isn't going to be a problem.

But given your algorithm with all of its inversons/etc, do you
have any idea how many Timer1 ticks is the difference between
measuring 2480 and 2500?

- dan

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


<1.5.4.16.20010223111255.3367a27e@addr.com>

See also: www.piclist.com/techref/microchip/time.htm?key=count
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Frequency counting

month overview.

new search...