you can probably use COUNT to do the job.
Detecting 7.5Khz with +/- 10% => from 6.82 KHZ to 8.25 Khz
so what about the following
Code:
' Pic 16f84 at xtal 4 Mhz. WDT off PTU off'
' Detecting 7.5Khz with +/- 10% => from 6.82 KHZ to 8.25 Khz
'
FI VAR PORTA.3 'input freq
SO VAR PORTB.0 'OUPUT LED
W0 VAR WORD 'VARIABLE W0
INIT:
count fi,100,w0 ' Count pulses for 100ms
IF (W0>682) AND (w0<825) then PULSE
GOTO INIT
PULSE:
HIGH SO
PAUSE 500
LOW SO
PAUSE 500
GOTO INIT
END
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks