Hi, I write a program in PBP and have this problem.
I need to detect an 7.5Khz frecuency +/- 10 % but the range is too much from 6.4Khz to 9khz.
the program:
'Pic 16f84 at xtal 4 Mhz. WDT off PTU off
FI VAR PORTA.3 'input freq
SO VAR PORTB.0 'OUPUT LED
W0 VAR WORD 'VARIABLE W0

INIT :PULSIN FI,0,W0 'DETECT TRANSITION 1 TO 0 AND SAVE IN W0
IF W0 = 7 THEN PULSE

GOTO INIT
PULSE HIGH SO
PAUSE 500
LOW SO
PAUSE 500
GOTO INIT
END

Please sorry my English and my poor level in PBP but I try to learn more a day.
Apreciate any help.
Melectro.