Fran Tech wrote: > I need to measure a frequency range of apporximately > 700hz to 4000hz.=A0 The frequency will be in the form of > a squarewave. You may wish to try thinking conceptually. Divide your app in a few layers: - bottom highest priority level - just register both signals: timing signal and your input signal. In case of 32-bit controller to achieve that you need nothing but just a couple of properly configured 32-bit counters, yes, they should be configured "free running". You could organize them in "software" for 8-bit controllers. - middle layer, let's call it "Business Logic Layer" - the code that would take snapshots of that counters and store the snapshots into a circular buffer, that is, would keep in the memory last, say 32 snapshots taken with the period, say 0.1 sec. - UI (User Interface) Layer - the code that would subtract the values of the snapshots corresponding to desired time span and then calculate the frequency of the input signal. (This code may well belong to "Business Logic Layer" if meant to be reused in other modules.) If your signal is changing slow enough (in relation to the speed of your controller), the precision of this method is limited only by the stability of the crystal oscillator. Good Luck. To Vitaliy: Don't ask me to provide a reputable source on the above, he is quite busy fighting against the cruel windmills of the pre-moderation :-) -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist