Quote Originally Posted by Tomexx
Hi,
I'm trying to measure a pulse using the PULSIN command.
Everything works when I'm sending a clean pulse from the Pulse Generator. But then when I move into the real world (a push button switch changing from 0V to 5V) things stop working.

I suspect that contact bouncing on the switch is the problem.

Can I software debounce the PULSIN command somehow?
Different application, but I have the exact same problem, in Proteus VSM my program works perfect, since proteus have "perfect switches" but when I wire up the protoboard and program the pic, the switch does not work as expected.

Now I'm looking for a sure& safe way to debounce it, any ideas will be appreciated !

Thanks