Connect with us

ATTINY uC Sleep-Mode Functionality

Discussion in 'Microcontrollers, Programming and IoT' started by JimL86, Nov 13, 2017.

Scroll to continue with content
  1. JimL86


    Nov 13, 2017
    I am working on a project that involves an ATTINY45 microcontroller.

    I want it to be in SLEEP MODE most of the time and every 2-3 minutes check specific GPIO pin (HIGH or LOW). If it is HIGH add 1 to a counter otherwise Reset a counter.

    - Is it possible functionality? Or maybe there is a better way of using interrupts?
    - For how long should a CR2032 BATTERY LIFE SPAN hold with that REGIME?

    Glad if you could assist and let me think what problems may also occur.
    Thank you very much
    Last edited by a moderator: Nov 26, 2017
  2. dorke


    Jun 20, 2015
    Yes it is possible.
    For lowest power consumption use the μC in power-down mode.
    Wake it up on interrupt from one of the sources: watch-dog timer or pin change.

    See chapter 7 in the datasheet

    About the battery life:
    Here is a nice and free calculator for that.
    Enter your parameters and find out.
    Last edited: Nov 29, 2017
  3. JimL86


    Nov 13, 2017
    Thank you very much!
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day