Menu

Power cycle switch

Help
2008-12-13
2013-05-30
  • Nobody/Anonymous

    how do I make it so a 12f629 will do one sub when the power is turned on, and do another sub if the power is turned off then back on again quickly?

     
    • kent_twt4

      kent_twt4 - 2008-12-13

      Isn't that what reading a button does for you?

      If absolutely necessary, try a comparator interrupt for the shutdown part, and write a variable to eeprom.  On startup, read back eeprom at beginning of program to decide which sub to branch to.  Is there enough time to write to eeprom?  Does it work reliably?   

       
      • Nobody/Anonymous

        that is what i was looking for , the one I've seen must write to the eeprom because it comes back up from a long power off in the last mode it was in last, but how would i do that?

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.