I have designed a simple RC5 remote control using a PIC16F57 and the classic rows-columns scan over a 4x4 matrix keypad.
The previous version of my firmware continuously scanned the keypad to find a keystroke but the batteries consumption was to high (obviously).
Now I'm trying to implement a wake up system in which the micro sleeps all the time and wakes up only when the user press a key on the matrix. The problem is that the 16F57 can only wake up on 1) low logic level on MCLR or 2) watch-dog timeout. The latter could be feasible but it would imply polling the keypad every, let's say, 100msec. The first solution is the best but I couldn't make it work.
The solution was addressed here: http://www.t-es-t.hu/download/microchip/an528d.pdf
It's an official Microchip document so it should work. However I implemented the circuit and it doesn't work. The micro goes sleep but doesn't wake up (all the scanning lines are at logic level low before going sleep so they should discharge the capacitor).
The proposed solution uses a 47K resistor to pull-up the MCLR pin but in the official datasheet of the 16F57 they recommend a <40K resistor for correct usage. I tried to use a 47K and the pic didn't start so, thinking of a typo, I used a 4.7K which resulted ok to start the pic (although it didn't solve the wake-up problem).
The voltage across the capacitor should drop to a near zero to trigger the MCLR pin and cause a wake up but it seems that the scanning line, even at a logic zero, can't discharge the capacitor.
Do u have any clues how to solve the issue? thank you!
P.S. the capacitor in the schematic doesn't have the "+" sign so I assume they want a non-electrolytic capacitor.