Info wrote: > Yes, you are right. Thats why I want to see what can be done about > rejecting 50Hz noise from inputs. The simple RC-filter above is for > 5kHz. But perhaps it should be for 50 Hz instead? In general, you want to make the input filter as slow as possible. How slow that is depends on your requirements: a slower filter introduces a longer delay and will completely suppress longer pulses than a faster filter. So the first things to decide is how long the maximum delay is that you can allow, and how short the minimum pulse width is that you need to see. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist