PDA

View Full Version : frequency measurement



big-x
- 23rd April 2003, 04:48
can anyone help me with frequency measurements... i'm using a voltage to frequency converter to remotly sense a temperature, and for now i'm using a basic stamp to make the prototype. i will be moving it to the pic16f84 when done but i need to be able to measure the frequency down to +/- 1 Hz.... using the pulsein or the count function all i can get is a +/- 10 Hz and that is'nt good enough for the application.. so any hlep would be very much appreciated

the frequency range is a represntation of the absolute temp scale where 2732 Hz is the temp of ice

thanks

Erwin

Nitro
- 2nd November 2005, 21:08
interestingly enough, if you go into the pic's datasheets, you see two ways to count pulses in hardware.
if tyou use something more complicated than the f84, you could use the external clock source for tmr0(0 to FF) or tmr1(0 to FFFF). using this you could count the pulses in a given delay period and get a figure in terms of
pin-oscils/(period) the time base can be multiplied to 1sec.
otherwise you could use the capture feature of the ccp module(which includes the pwm) to measure the amount of internal clock pulses in between every pulse on the pin. this will give an amount in terms of
periods/pin-oscils.
see if you can use either one.
the first is easiest because you just have to multiply for hertz. for the capture module you'd have to invert the fraction for hz.

NavMicroSystems
- 25th November 2005, 00:53
interestingly enough....

...to see people taking the time to reply to posts that are dated more than 2 years back (from users that are not registered anymore).....

;-)