2018-01-19 7:09 AM
We are using STM8L051F3 and it has 2 inputs which is 2 key keypad which we are using for our application. Now i want to use that keypad for ON/OFF of microcontroller also.How i can do that? I want to ON controller power supply when i press keypad key and then i will use those key for my application also and then if i key for long time or press both keys it will OFF, i.e. power supply cut off. This is like our old keypad mobile phones which has 1 key for Mobile phone ON and that same key we can use for receiving call also. How can i do that for my STM8L051F3?
2018-01-19 7:35 AM
Maybe these materials will be useful to you:
https://sourceforge.net/p/s3-code/code/ci/master/tree/superbutton/
2018-01-19 8:55 PM
Hi thanks for response, Yea i can do that longer button press detection using timer. Main thing is hardware i think, That i want to give power supply to controller using 1 button not switch, means if i pressed once power supply goes to controller then our application will work and if i pressed that button little longer it will off. Problem cant be solved by just code i think, it needs hardware. So i built latch circuit which gets ON when i press a key and our controller gets power supply but then i cant use that key for my application as it is always high, as it is base pin of BC547.
2018-01-19 11:27 PM
It is how you want. Modern micro-controllers do not need to remove power.
The current consumption in sleep mode is very small. A wake up the
controller can be executed by the same button, connecting it to the wake up
input signal.
2018-01-20 12:25 AM
So there is no way to completely off microcontroller?
2018-01-20 1:34 AM
Is need small external electronics circuit for complete switch off the
micro-controller by SPST push button.
2018-01-20 2:09 AM
I found one circuit but i don't understood its working 100%, kindly check the link
2018-01-20 2:32 AM
It's original. What you do not understand specifically? The author described the principles of the circuit quite well. You can improve your skills in circuitry understanding by study special education courses.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.