I have a problem with this arrangement.
The switch is placed 15M ahead. I used a CAT5 cable. The problem is sometimes it will make the PIC input low without pressing the switch.
I have a problem with this arrangement.
The switch is placed 15M ahead. I used a CAT5 cable. The problem is sometimes it will make the PIC input low without pressing the switch.
You need to add a resistor (10k to 100k) across the 1u to make sure it discharges. You don't really need the transistor. Just use a 1k to 10k and 1u in parallel.