PDA

View Full Version : Swicth PIC ON/OFF with Membrane Keypad



koossa
- 24th August 2005, 13:28
PLEASE HELP

I'm using a 16F877 and a 4x4 Membrane Keypad (xy grid) to 8 Pin Connector.

I am using some other chip to switch my circuit on and off using one of the keys on the membrane keypad.
This chip has 1 pin (ONB) that would switch my circuit ON if I turn it HIGH and switch my circuit OFF if LOW.

So this is what I have tried:
If the ON/OFF button is pressed on the keypad, it would make a short between pin 4 and pin 5 on the keypad connector.
I have connected pin 5 to ground and Pin 4 to one of the pins (PortD.1) on my PIC16F877 and to ONB.
So, when I connect the batteries to the circuit the ONB Pin should float, and not be turned on.
When I press the ON/OFF button on the keypad, it would make a short between Pin 4 and Pin 5 and pull ONB to ground which would start up my PIC, then put PortD.1 LOW to keep it on.
If I later want to shutdown my circuit I would just put PortD.1 High.

But this does not happen, when I connect the batteries to my circuit it automatically switch on without me pressing a key?

How should I connect the circuit so that I can have full control over the ON and OFF?