View previous topic :: View next topic |
Author |
Message |
chava
Joined: 07 Sep 2003 Posts: 56
|
use of WDT to save power |
Posted: Wed May 19, 2004 5:17 am |
|
|
Hello
I have a circuit which its supply may shot down for about 40 sec.
I have to keep the pic alive for that time.
now, since I have power problems I wondered if I could "help" the hardware with software - by geting into "sleep" period.
would it help?
the pic samples the high supply voltage(220VAC) .
what I want to do is - sample that pin. and if I see that there is no voltage I enter "sleep" mode. every 18msec I want to wake up (by the WDT) and check how much time passed since the supply went off.
can it be done? how?
Last edited by chava on Wed May 19, 2004 5:37 am; edited 1 time in total |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Wed May 19, 2004 5:35 am |
|
|
Putting the PIC in the sleep mode will significantly reduce its power consumption, but it will not keep it alive if the power supply shuts down.
40 seconds is a long time. Even if you don't have other circuitry connected to your power line and you have huge capacitor between your VCC and ground, it is still gonna be a challenge to hold the power for 40 seconds.
Since you have enough control over the process to put the PIC to sleep, you can also use this method: Save all important state information in the EEPROM and wait for the sutdown. When the power goes back up you can use that information to resume from where you stopped. |
|
|
chava
Joined: 07 Sep 2003 Posts: 56
|
... |
Posted: Wed May 19, 2004 5:39 am |
|
|
no, I dont have eeprom (pic12c508a)
(I edited the topic, to make myself clear, read it ) |
|
|
|