You seem to have a good handle on using the capture function. I would continue with it until either you get success or decide that other factors dictate another path. Out of curiosity, why don't you run your capture business through an interrupt as well as the TMR1? Then you don't have to worry about missing pulses or whatnot. A software loop (or another timer) can warn you about times when the turbine is going way slow or stopped. One thing you did not mention (but probably know about) is adding hysteresis for the actual switch over from star to delta. As the wind will speed up/slow down continually, you probably won't want it switching back and forth when it's just at the threshold... Jinx wrote: I'd like to have some thoughts about the range of CCP please. I've not used CCP for a long time and the only other time I did it was with a quite narrow input range I'm making up a test-bench version of a frequency switch for a wind turbine. The final implementation will be a simplified version of this At some frequency the coils need to be switched from star to delta or back. The unit I'm making now is for the turbine prototyper, and will include pot-settable switch frequency, +/- window, +/- time period, time in delta configuration, time in star configuration, etc The estimated switch-over frequency is about 300Hz (from the coils, not the blades) I'm using a 16F88 running at 16MHz, TMR1 increments are 250ns I calculated 61Hz as the lowest frequency measurable with 16-bit TMR1, (ie 4,000,000/65536), and that seems to be verified on the LCD. Below 61Hz, TMR1 overflows before the next input edge and so the LCD display of the division is meaningless. At the other end of the scale, due to LCD processing time, the upper limit is about 2100Hz, but as the turbine should be governed, I'm not too worried about that I'm not particularly interested in displaying the actual frequency below 61Hz, but maybe display "<061" or "Slow" or something like that So far I'm simply polling PIR1,CCP1IF and then jumping off to the division/LCD routine I'm trying to break this down logically. If TMR1IF goes off before CCP1IF, then the frequency is below 61Hz and should be ignored. However, the next input edge may come in shortly after TMR1IF, and CCP would be a small value of TMR1 (which is what happens now and the frequency displayed is in the 1000's of Hz) Should I be timing input edges with another timer and using that measurement to indicate whether CCP is > 61Hz ? Bearing in mind that at some times the turbine will be stopped or moving very slowly, leading to huge counts in a timer. Or is there another method ? Any ideas, links to similar projects etc, welcome and appreciated TIA -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist