----- Original Message -----
From: Olin Lathrop <.....olin_piclistKILLspam
@spam@COGNIVIS.COM>
To: <PICLIST
KILLspamMITVMA.MIT.EDU>
Sent: Tuesday, September 19, 2000 9:40 AM
Subject: Re: [PIC]: freq counter
> > I need to make a freq counter with fixed offset additions good for about
> 134
> > mhz....
>
> The most accurate way to measure frequency with a PIC is to use a CCP
module
> to determine the period. In your case you need an external divider to get
> the frequency down to what a PIC can reasonably handle. If you use a
20MHz
> PIC, then your period resolution will be 200nS. If this is just meant to
> update a display in human time, then you can easily afford a measurement
> period of around 100mS. That gives you an accuracy of almost 19 bits, or
> 2ppm, which probably exceeds the accuracy of your reference oscillator
(the
> PIC instruction clock).
But then you have to deal with the ugly F = 1/period equation, which is a
pain in assembly, and hides a lot of overhead in "C".
> > 1...has anyone done this ?
>
> Yes, I've done this sort of thing a number of times. One of them was a
> tachometer application, which is essentially a frequency meter. This was
> done on a 16C923 using the CCP module as I described above. The '923 also
> drove an LCD display directly to show the result to the user.
>
> The 923/924 are pretty neat devices that don't seem to be that well known.
> Maybe that's because they have limited clock speed (8MHz) and usually not
> enough program memory space, and only 8 bit A/Ds. Fortunately the new
parts
{Quote hidden}> coming out will provide 10 bit A/Ds and more program memory, but Microchip
> still blew it by not adding a UART.
>
>
> *****************************************************************
> Olin Lathrop, embedded systems consultant in Devens Massachusetts
> (978) 772-3129,
.....olinKILLspam
.....cognivis.com, http://www.cognivis.com
>
> --
>
http://www.piclist.com hint: PICList Posts must start with ONE topic:
> "[PIC]:" PIC only "[EE]:" engineering "[OT]:" off topic "[AD]:" ad's
>
>
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:" PIC only "[EE]:" engineering "[OT]:" off topic "[AD]:" ad's