I've made a simple handset with five switches, on the end of about 2.5m of six-core cable.
It's on PORTA and I'm using the internal pullups to hold each N/O switch high, and detecting when they are pressed and pulled low.
I am getting lots of glitches- each time I press a switch 1 or 2 other pins briefly go low.
My test routine just outputs a Hex number, so when the switch on pin 4 is pressed, for example, it should change from 0x1F to 0xF, but if I press briefly I get 0x0B or 0x0D. Hold it down and I get a stream of 0x0F.
Now I assume this is a cross-talk issue because of the pulse of current when I press a switch, not a debounce issue (which would give me flaky results on the pin I'm switching).
A 'kludge' in software would be to introduce a delay and re-read the switches after allowing time to settle, I may have to do this.
BUT I would rather cure the problem at source. My initial thought is a 100nF cap across each switch, but can anyone suggest a better way (other than taking 5v to the handset and having supplementary pull-ups as this would require 7-core cable and a different type of connector etc.)
<edit> I should add I have checked and all the switch lines and the ground line are no more than 1 ohm.