Apart from the Resistor connection that Ski mentioned (which is there to keep Q1 switched OFF), it is the job of your PIC to drive RA1 high BEFORE the User removes his finger from the switch. If your software has delays or other things before it sets RA1 high, then the circuit will simply switch-off when the finger is taken off the switch.
It is a simple circuit - it can't fail. As long as the Base of Q1 is driven low (what is your value for R2 and what is the current draw via Q1?), it will conduct and supply power. Check your wiring and software and value for R2. Remember (simplistically) the gain (hfe) value for your chosen Transistor together with the current you're sucking out the Collector will determine the amount of cuurent you need to put into the Base. Your chosen R2 may be too high a value.
Bookmarks