Skip to main content
Visitor II
January 19, 2018
Question

ON/OFF Microcontroller

  • January 19, 2018
  • 2 replies
  • 2526 views
Posted on January 19, 2018 at 16:09

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?

    This topic has been closed for replies.

    2 replies

    Visitor II
    January 19, 2018
    Posted on January 19, 2018 at 16:35

    Maybe these materials will be useful to you: 

    https://sourceforge.net/p/s3-code/code/ci/master/tree/superbutton/

    Visitor II
    January 20, 2018
    Posted on January 20, 2018 at 05:55

    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.

    Visitor II
    January 20, 2018
    Posted on January 20, 2018 at 07:27

    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.

    Visitor II
    January 20, 2018
    Posted on January 20, 2018 at 08:25

    So there is no way to completely off microcontroller?