chien_fu
Newbie level 5
Newbie here, trying to get my battery to last as long as possible. What I want is a "sleep mode" that wakes up the chip when a button is held for 2 seconds.
This is the program I have now, using PICBASIC.
Is this a relatively low-power method of getting a chip to "sleep" for several hours, possibly days at a time?
Thanks.
This is the program I have now, using PICBASIC.
Code:
Sleepmode:
pause 1000
if pin2 = 1 then Increment
if holdcount > 1 then Startup
goto Sleepmode
Increment:
LET holdcount = holdcount + 1
Return
Is this a relatively low-power method of getting a chip to "sleep" for several hours, possibly days at a time?
Thanks.