Key press to switch on uC, timer to switch off power control of uC ?

Hello,

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.

Regards,

Martin

Reply to
Martin Maurer
Loading thread data ...

Most MCU's have some sort of sleep or low power mode that draws in the microamp range, which is usually less current than the self discharge rate of most modern cells. It is a trivial matter to have say a PIC MCU go to sleep after a period of time and wake on a button press.

Jim

Reply to
James Beck

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.