palam.c wrote: > Hi all, > I am working on PIC project where the whole system > is powered by battery. I am trying to add soft power > switch , ( push it to on, push it again to off) . > > I found lot of solutions using relays, but i am looking for > transistor based solution. Anybody implemented this > before ? Thanks in advance. > > regards, > palani > Yes. The easiest way is to do this is to use an external CMOS device, such as CD4001. This chip draws no measurable power whatever. The CD4001 always has power, and the PIC VCC is provided by one or more of the CD4001 gate outputs. The CD4001 is cross-wired to generate a flop-flop. The switch is designed so that by pressing the switch, the flip-flop supplies power to the PIC, by forcing the CD4001 to turn "ON". The PIC also senses the switch using an input pin. so that later it will act on it to turn the supply off later. The PIC does its thing, then will sense the switch being pressed again for OFF. The PIC notes the press, then waits a second after the switch has been released (to ansure that the switch won't be pressed again), then the PIC pulses an OUTPUT high through a CAP (0.005uF will do, if the resistor to GND on the CD4001 is high in value). The pulse thru the cap will cause the CD4001 flip-flop to toggle off. That's it. If you have rouble following me, I can dig out the schematic. . --Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist