Thanks to both of you who responded for the extremely helpful advice. I'll try the debounce first since I won't have to make any hardware changes. I appreciate the help. John On Tue, Mar 21, 2017 at 4:52 PM, Brent Brown wrote: > On 21 Mar 2017 at 16:25, John Hansen wrote: > > > I'm doing a project that involves a keyboard scan. The project is > battery > > operated with the usual matrix structure with the keypad rows set as > inputs > > and the columns set as outputs. The inputs have the internal pullups > > enabled and I'm using the wakeup on change interrupt. It works > > perfectly (with very little current draw as expected) except for one > > thing. If I bring my hand close to the keypad while it is asleep, it > wakes > > up and registers a keypress. > > > > This project is designed to be plugged into a radio and when it is > plugged > > in (that is the keypad ground is connected to the radio ground), these > > phantom keystrokes go away. > > > > Is there any way to get this behavior to stop when the keypad is not > > plugged in? > > Hi John, > > Adding external pull up resitors of relatively low value (compared to > internal > pull-ups) will help reduce spurious signals like you are seeing. Anything > from say 1k > to 10k Ohms... this shouldn't change current draw at all while idle, only > when > switches pressed. > > Next step is to have your micro wake up briefly and do some switch > debouncing > (checking for constant greater than 20 or 30ms switch press) before > deciding to > wake up properly. > > It's not uncommon to see spurous signals like this. Dependent on > environment and > nearby equipment etc, but design for worst case in mind. > > Brent > > > -- > 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 .