Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Trying to get low-power usage mode...

Status
Not open for further replies.

chien_fu

Newbie level 5
Joined
May 11, 2008
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,373
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.

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.
 

Hi,
Your Sleepmode routine is a pause of 1000. I guess you are using a loop of nop.
If you use interruption you'll save much more power.
 

okay... so, I'm coming up dry with my searching. Can someone point me in the right direction. I'm looking for:
1. What the hell is an interrupt and
2. how do I use them in PICBASIC?

Thanks dudes.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top