For Capture Compare usage, do a search at the MeLabs archives and look for "PICBASIC-L How to use ccpx2.bas example" (circa April 2003). The original datafile is posted on the MeLabs site also. Within that thread there are other references to frequency measurement including the thread "PICBASIC-L Frequency Measurement" also from April/May last year. From there that should give you a whole heap of ideas and code...