in the TTL stone age, we was using an RC circuit. output of the switch to a pull down resistor an to a capacitor, the other side of the capacitor to the PIC input and to a pull down resistor.
Some will also prefer to use a Schmitt trigger or a voltage comparator with a close to VDD treshold.
Bookmarks