ATTINY uC Sleep-Mode Functionality

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

  1. JimL86

    JimL86

    Joined:
    Nov 13, 2017
    Messages:
    13
    Likes Received:
    0
    Hey,
    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
    JimL86, Nov 13, 2017
    #1
  2. JimL86

    dorke

    Joined:
    Jun 20, 2015
    Messages:
    2,344
    Likes Received:
    663
    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
    dorke, Nov 29, 2017
    #2
  3. JimL86

    JimL86

    Joined:
    Nov 13, 2017
    Messages:
    13
    Likes Received:
    0
    Thank you very much!
     
    JimL86, May 5, 2018
    #3
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.