Some time ago, I had a thread dealing with counting the frequency...well...number of pulses, using a 1 sec interupt allowed me to determine the frequency. I was using RB0 and using it as an interupt to increment a counter. Up to a certain frequency, it would work fine and then begin to act inconsistant typically reading a higher frequency. It was suggested to use the TMRx counter, and so over the last weekend I modified the board for that and yes, worked extremly well, as expected. However, there is one feature that I currently have implemented that I am not sure I can implement using the counter feature. In some applications, we get spikes in the input line, that cause invalid counts. So I did a little digital filter, where I implemented a timer that if the pulse was less than the typical pulse width, I threw it out and didnt increment the counter. From what I can see, there really isnt a method to validate the pulse width, short of an RC filter external to the input pin or using a 10F to validate (digital filter). I haven't convinced the client to change his hardware yet as I need to resolve how to do this. Does the dsPIC have any sort of "prefiltering" that can be implemented, prior to a hardware counter? --------------------------------- Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist