On Wed, 24 Nov 2004, Mike Singer wrote: > Johan Rantala wrote: > > > > What's the range of the period? > > > > about 10uS - 100uS > > > What's the PIC16F877A OSC frequency? > Why not reveal this kind of basic info in the beginning to sharp the > problem instead of sinking into possibly non-consistent solution ;-) > Yeah, you're so right ;) I'm using a 20Mhz external crystal. > At 20 MHz PIC16F877A you have only 40 instructions per 10 microsecond period. > Not that many for C language. > Perhaps you should switch to: > - assembler; > - PIC18Fxxx; > - TIP #2 Measuring the Period of a Square Wave _with Averaging_ So the CCP-module with my PIC16F877A is out of the question for measuring these kind of periods? Would it help to use every 16th rising edge? Best Regards, Johan _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist