Hello Mister_e,

Mister_e>>so the last solution i post give the whole period. It's an interesting solution when amplitude vary. Test it. I Tell you... THAT'S the solution.<<

It sounds like I am better to write my own code for the pin...
somthing like the following:


Maxcounter var word
Frequence var word


Maxcounter=1000
Fequency=0

Loop:
if pin=low, goto loop

while pin=High and Maxcounter>0
Frequency=Frequency+1
Maxcounter=Maxcounter-1
endwhile

while pin=low and Maxcounter>0
Frequency=Frequency+1
Maxcounter-Maxcounter-1
endwhile

if Maxcounter<0 goto badsignal

If abs Frequency-range <tolerance than printout frequency...
etc etc.


Any suggestions or ideas?

Dwayne