Truncated match.
PICList
Thread
'In and Out of Sleep'
2000\01\31@155526
by
Mark Peterson
I looked through the archives but couldn't find what I needed. Any help on
this would be appreciated.
I want to put a PIC16C715 to sleep in the middle of a loop. I want it to
go to sleep for 2.5 seconds, give or take couple tenths, and automatically
start back up where it left off. I also need to be able to wake it up as
the result of a digital input being asserted.
Battery current draw has become a significant factor in this project. I
was going through a loop 50 times, checking for the digital input each
time, in order to get my 2.5 second delay. It looks like I can reduce my
current draw significantly by implementing the SLEEP function, but being a
beginner, I don't know how to do it.
Thanks.
Mark Peterson
2000\01\31@162614
by
Robert Rolf
|
Mark Peterson wrote:
> I looked through the archives but couldn't find what I needed. Any help on
> this would be appreciated.
>
> I want to put a PIC16C715 to sleep in the middle of a loop. I want it to
> go to sleep for 2.5 seconds, give or take couple tenths, and automatically
> start back up where it left off. I also need to be able to wake it up as
> the result of a digital input being asserted.
>
> Battery current draw has become a significant factor in this project. I
> was going through a loop 50 times, checking for the digital input each
> time, in order to get my 2.5 second delay. It looks like I can reduce my
> current draw significantly by implementing the SLEEP function, but being a
> beginner, I don't know how to do it.
If you aren't too concerned about accuracy, use a TLC555 timer to wake
up the processor with the INT pin at your sampling rate. You'll need a big
capacitor and good circuit layout to get that long a basic period.
There is also a 555 based device with built in counter chain for 'long period timing', but
I don't remember the part # off hand.
If you want better stability, use a 4060 with a 32kHz xtal osc and tap off Q13 to get a .5
hz interrupt rate and divide in software to get 2.5 seconds.
(Or use 1Hz tap and use software to interrupt on the opposite edge after
the 2nd one (1 sec + 1 sec + .5 sec).
You could also use a Dallas D1307 and the 1Hz SQWO to interrupt.
Use a B7:4 bit to 'wake on change' for your other pin, or wire or your
input to INT.
Lots of choices now...
spam_OUTRobert.RolfTakeThisOuT
UAlberta.ca
2000\01\31@165533
by
Don Hyde
|
When you put a PIC into SLEEP mode, its oscillator stops, which stops almost
all of its internal logic. This is what makes it draw so little current (a
couple of microamps). It also means that most of the stuff inside the PIC
stops working, including counters that are running off the oscillator.
So you will need some kind of external timing source.
You could use some sort of counter or one-shot to provide a wake-up pulse on
the RB0/INT pin, which will wake most of the PIC's, or there are other pins
on various models, which can be used to wake up the processor.
The mid-range PIC's (I'm using 16C63A, mostly) have a TIMER1, which can be
configured to run in sleep mode using a 32KHz watch crystal. This can be
quite simple (though a tiny bit tricky to get the oscillator right see App
note 588, which you can get from the Microchip website), and can get you
sleeping with a convenient software-settable wake-up timer for about 20
microamps.
> {Original Message removed}
2000\01\31@184335
by
Andrew Hooper
Rather than use a 555 timer why not use an LM3909?
if I remember correctly they use less power than thee 555
and will opperate from a wide range of voltages.
Andrew
{Original Message removed}
2000\01\31@185205
by
Erik Reikes
|
Something else to think about is using the WDT to wake you from sleep. I
forget the accuracy specs on the WDT reset, but I know it can be scaled
with Timer0 to about 2.5s. If you need more accurate time than its RC
oscillator provides, you can use your crystal to calibrate periodically. I
do this on a project by setting a flag and letting my micro watchdog out.
While I'm waiting for the watchdog timeout I increment a counter. The flag
setting tells me I did an intentional dog out and I go to code that reads
the counter and adjusts my sleep times accordingly.
HTH
Erik Reikes
At 03:52 PM 1/31/00 -0600, Don Hyde wrote:
{Quote hidden}>When you put a PIC into SLEEP mode, its oscillator stops, which stops almost
>all of its internal logic. This is what makes it draw so little current (a
>couple of microamps). It also means that most of the stuff inside the PIC
>stops working, including counters that are running off the oscillator.
>
>So you will need some kind of external timing source.
>
>You could use some sort of counter or one-shot to provide a wake-up pulse on
>the RB0/INT pin, which will wake most of the PIC's, or there are other pins
>on various models, which can be used to wake up the processor.
>
>The mid-range PIC's (I'm using 16C63A, mostly) have a TIMER1, which can be
>configured to run in sleep mode using a 32KHz watch crystal. This can be
>quite simple (though a tiny bit tricky to get the oscillator right see App
>note 588, which you can get from the Microchip website), and can get you
>sleeping with a convenient software-settable wake-up timer for about 20
>microamps.
>
>
>> {Original Message removed}
'In and Out of Sleep'
2000\02\01@002832
by
Harold Hallikainen
On Mon, 31 Jan 2000 15:51:29 -0800 Erik Reikes <.....ereikesKILLspam
@spam@XSILOGY.COM>
writes:
> Something else to think about is using the WDT to wake you from
> sleep. I
> forget the accuracy specs on the WDT reset, but I know it can be
> scaled
> with Timer0 to about 2.5s.
Yep, I've done this. The PIC wakes up on a WDT timeout or interrupt. It
the continues from where you "put it to sleep".
Harold
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
dl.http://www.juno.com/get/tagj.
2000\02\01@003908
by
Alan King
Woke me back up when I looked up at the subject and read sheep instead of
sleep. I think I need sleep a little more than my pics now..
> When you put a PIC into SLEEP mode, its oscillator stops, which stops almost
2000\02\01@214818
by
Peter
>Date: Tue, 1 Feb 2000 12:36:28 +1300
>From: Andrew Hooper <andrew
KILLspamBEST.NET.NZ>
>Subject: Re: In and Out of Sleep
>
>Rather than use a 555 timer why not use an LM3909?
>if I remember correctly they use less power than thee 555
>and will opperate from a wide range of voltages.
The LM3909 was discontinued about 18 months ago.
regards,
Peter Crowcroft
DIY Electronics (HK) Ltd
PO Box 88458, Sham Shui Po, Hong Kong
Voice: 852-2720 0255 Fax: 852-2725 0610 Email: .....peterKILLspam
.....kitsrus.com
Web: http://kitsrus.com
----------------------------------------------------------------------
2000\02\01@223410
by
paulb
Peter or KITSRUS wrote:
> The LM3909 was discontinued about 18 months ago.
And a good thing too. A highly over-hyped chip in the hobby
literature IMO. Its time-constant resistor was about 3 k ohm, so it
required *very* large capacitors for slow flash rates and even this
resistance represented a minimum drain of about 1 mA.
Also, and related to that resistance, it wasn't particularly useful
for all the other applications suggested (given that its primary
application was to flash a LED from a 1.5 V cell).
If you were to use a 555, it would be a TLC555. But all this is
unnecessary complication. The best answer to the question was that you
use the Watchdog timer - that appears to be what it was put there for.
--
Cheers,
Paul B.
More... (looser matching)
- Last day of these posts
- In 2000
, 2001 only
- Today
- New search...