Quote Originally Posted by schu4647 View Post
I have never tried this so it may not work. What about a pFET sourcing your regulator. Have your on switch be a button that takes the pFET gate low and turns on your micro. The pFET gate is also tied to a micro IO pin which immediately goes low holding the pFET on. When you have a period of inactivity you make your gate high shutting off the entire board until that button is pressed again.
You probably need an NPN with the collector pulled up to the 9V through a 1k. Tie the collector to the gate of the pFET. The base of the transistor will go to the button and to the micro pin. When the button is pushed the base goes high turning it on and pulling the gate low. Your board is now on and your micro pin needs to go high to keep it on. During inactivity you make the pin low. That turns off the NPN which then takes the gate high and turns off your board. I am so brilliant. I think anyway.