i have a switch connected to a atmega32, one end of the switch to ground the other to a Mc pin. The switch is a normal domestic switch, but the wiring runs along with the normal household wiring(about 10-15 mts length).
I am having problems with its behaviour. sometimes a press/release is not registered. i have 4 such circuits. 2 are giving me problems while the other 2 are angles! all switche wiring are the same length and run parallel to each other sharing a common ground.
I have used a debounce routine.. the switch works fine otherwise in test conditions(less than 1 mtr length wiring)
what do u think i should do? apply an external pullup resistor such as 1k?
let me know!