To measure the period and/or frequency of a fast waveform you have two basic solutions: 1: Use the CCP with the 'every 16th edge' option. Compute the difference of the counts every N interrupts. You now are determining the period of 16*N cycles of the original waveform. 2: Connect your input to a Timer/Counter. Enable the counter for a known time interval based on the crystal frequency of the PIC. The value in the counter will be proportional to the frequency of the input. Of course to go from period to frequency or the reversion you just need a division. Bob Ammerman RAm Systems _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist