This is a multi-part message in MIME format. ------=_NextPart_000_0171_01C5026A.55ED2140 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > At this moment thinking to use matrix keypad but > If I must use some thing else then I can do it. > Yes I have spare I/O to drive FET but I still do > not imagine when pic is off there is no power to it > how to turn back on digitally. Any idea ? I was thinking of this (attached). Only a quick sketch and I'm sure (in fact I know !!!) someone can improve on it. There may be a horrible flaw in it, hope not. Even if this isn't the exact answer there will be one The idea is that R2 holds the FET off and R4 holds the PNP off. When the O-O button is pressed, the gate of the FET goes high, pulling the PNP base low, turning it on. This powers up the regulator andd PIC. The PIC then takes On/Off I/O high to keep the FET on. If On/Off is pressed again, this can be detected by the keypad scanning and On/off I/O sent low to turn the FET off. D1 limits the 9V to 5V1 on the PIC pin A couple of concerns - the gate of the FET must go low to turn everything off and will there be any remnants of voltage to stop the PIC turning off properly ? I'd be interested to see a workable solution, even if it's nothing like what I done ------=_NextPart_000_0171_01C5026A.55ED2140 Content-Type: image/gif; name="keypad_o-o.gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="keypad_o-o.gif" R0lGODlhZQFIAYAAAAAAAP///ywAAAAAZQFIAQAC/oyPqcvtD6OctNqLs968+w+G4kiW5omm6sq2 7gvH8kzX9o3n+s73/g8MogDEovGITCqXzKbzCY1Kp9SqU4gVAbLcbmLrDV/A4vKPbE430Op2je12 w+P01rxevuP3JT2f6/cn2BE4CFRomFiBqLjD2Ai5Fgk4WbloKfSIOam5CdPpqQgayjJKKmh6OqSq msraF2Q19er6OlKrgvugS8dr6+FrErwwrFb8m3GsdaKch2zTDBIdMO1V/RxxzTGtndWNLXnITAs+ 853McKRxHlsuwz6WjpAKf+YeU39JPE9NdODvJ18PgeUISrijjswWMP7CnWp4z4XBbPKoGUj4zwE7 /lkcqUR8MXGekooW2SjUaAXdhCKlQiJzqZHkwowMA2IYBWrjR4nt9tGECDDmTX1EV8C0dZSkSqUW HpnSubNUz6YshS71SY9nVKNTSeDSU3Wona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2VIc3bYc4tIgX/IdIenYUvXg4WHEj8IVmyCdZmoidLC/n8W8nVrN3aU2HegCHeO sIafeIltlIoTplGs6GOn6IqtWIqrOIuyaHedeBwhxnd/t3iMR4o2houeWIu/OIqJV4y9yIs+MHwL VHrGuE0XNWOj54xFdiDLGEDN6IzYiIzaCInUCIaJ+ElPxnqp53qtN2XmuEhXWHUPWCm6V47S6Evu 2IH+lowiZGb1mHvC54DQ12T6l4H9aGn7yI5rN4AryGWW2IZDwo86pYAymH0NqI6PhxzgJ5E6xWyw GFtPmIZbqIfHl3/x55B1h5CMqC8eCZCVhpJqSI8LWTAFGZICeGoCaZAQpn0zaWAjeYhz9pLrIYED eVQ4mZNfsoE7WRRD/gmUQRknNulV1wCCgXOUSDkmLSiVKkiUppeLNygMWNkHWtlYVWmV2sGDUOeD hRWW35himFWW2MJuT2mIKKKE9QaXTDg97DF7TDmXWeJRQHiXpQIoermX7zIpdvmXg2IofjmYObgn U3WYIRMY/kSSi2ltNCaYkClAlOlClslAmFksJWSCmtleLLRcnnlvT5SRt7KJp4maqSkLovkRUGON rMlgoAmbasIr49NJNNIYXaVls+kO4rRQL7UpjsmbFfgT5hJP2jY7HTWcq9IdjamcLuWcnLmc2tUk PzIihcNPhDedbLM10dlQidlTzbedlbA61UlThXme49ls5ylVulmdE7upnvEpn/NJn/Vpn/eJnwNT AAAAOw== ------=_NextPart_000_0171_01C5026A.55ED2140 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist ------=_NextPart_000_0171_01C5026A.55ED2140--