i want to use a uC for a remote control. I want to switch on the uC via a keypress, start the programm inside and switch the complete power off after a certain time (e.g. 30 seconds).
I thought it could be done in the following way: Key press (it is coming from a 4 x 3 matrix keyboard) must enable delivering power to uC, the uC starts up and a output PIN also must enable delivering power (so the power remains when the key is released). After doing some tasks and getting idle, the output PIN for power control changes and the complete system is switched off.
Can someone suggest how to implement the power part or point me to schematic for such a thing on the web ? Can i do it with 2 transistors ? Controlling the output port and writing the software afterwards is not a big problem, but i have no knowledge about analog circuits.