I rarely use the internals. The external pullups would be roughly the same value as the series resistor, 1k to 10k as appropriate, and 100pF to 0.1uF as appropriate on the cap. So if the switch is open, the switch pin is out low, and so is the pullup enable pin. Just before reading, the switch pin goes input, and the pullup enable pin high. During the read, if the switch is open, then we have a pair of resistors in series, with a cap on the pin. If the switch is closed, we have a resistor sourcing wetting current into the switch, and a series R into the switch pin, with a cap across that to ground. Logic levels are at the rails. I also never use interrupts on switches that are pushed by humans. I just poll them based on a timer. I don't worry at all about bounce. Whatever state I see, it's either truly at that state, or transitioning to that state, or from it. Next scan it will have settled. 10ms to 50mS per scan works well. I don't zap the board, that would be silly, I zap the complete product. On Sat, Oct 22, 2016 at 2:44 AM, James Wages wrote: > Date: Thu, 20 Oct 2016 16:33:55 +0000 > From: "Van Horn, David" > > The three switches I do have, have pull resistors that are activated > just before reading, and a series resistor between the switch and the mic= ro > for ESD. A small capacitor at the micro pin smooths the input, and that > ESD resistor also limits current between the cap and switch, keeping me > from ever exceeding the switch current rating. > > So you disable the PIC's internal weak pull-ups, set your input pins to > outputs, then just before you read the input pins, you enable the interna= l > pull-ups and then change them from outputs to inputs, then wait some time > (1us?) for things to settle, then read. That works for ports that have > internal pull-ups, but for designs with many switches, you may need to ha= ve > inputs on a port that lacks internal pull-ups, which means you would need > to treat them differently. > > What value is your series resistor? 100ohms? > > It seems you put the capacitor (to ground) after the resistor, between th= e > input pin and resistor to make a first order LP RC filter. What value is > your capacitance? > > I must say, zapping your circuit boards with a Tesla coil is fascinating. > I'd love to see a YouTube video of that in action! :-) > > James W. > > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .