Quote Originally Posted by mark_s View Post
Hi Louis
You did not say which pic you are using. You can read frequency by feeding the signal to the external timer input on your pic. It works by setting the TMR1 register to 0 , start the timer, let it count for a fixed period of time, stop the timer, read the value in TMR1 to variable Freq and display. The Pause routine is not super accurate for gating the timer so you need to tweak the value. A better way would be to use a second timer with an interrupt. This should get you started
Hello Mark,

I use PIC16F690 at 4MHz Xtal. I want to try Your code, the freq is stored in Freq variable, the sampling time is 0,1 sec that's OK but where to feed the input signal to PIC? (input pin) this is not clear for me.

Louis