In that case, the code could (should?) also check/verify the state of=20 the keypad input pins after wakeup and after the internal pull-ups have=20 time to be active. Any false wakeups due to meandering hands would=20 result in only a tad more power consumption. Cheers, -Neil. On 3/21/2017 6:15 PM, Jan-Erik S=F6derholm wrote: > Now, might it be that the internal pullup's are disabled during sleep? > That would explain way it gets so sensitive while in sleep. With the > normal internal pullup truly "on", I would not expect the device to > pick up noise just by moving your hand nearby. If they are disabled > the only solution is external pullups. If you device will wake up for > every 50/60 Hz power cycle and then wait 20-30 ms for a debounce > you could just as well keep it on. And, depending in the device, maybe > a "doze" mode might be optimal. > > Knowing the actual device used might remove some of the guesswork. > > Jan-Erik. > > -----Ursprungligt meddelande----- > Fr=E5n: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] F=F6r Jo= hn > Hansen > Skickat: den 21 mars 2017 21:26 > Till: Microcontroller discussion list - Public. > =C4mne: [PIC] Wake up from sleep on keypad scan > > I'm doing a project that involves a keyboard scan. The project is batter= y > operated with the usual matrix structure with the keypad rows set as inpu= ts > 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 plugge= d > 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 plug= ged > in? > > Thanks for any advice. > > John > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/cha= nge > your membership options at http://mailman.mit.edu/mailman/listinfo/piclis= t > > --=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 .