CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

use of WDT to save power

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
chava



Joined: 07 Sep 2003
Posts: 56

View user's profile Send private message Send e-mail

use of WDT to save power
PostPosted: Wed May 19, 2004 5:17 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed May 19, 2004 5:35 am     Reply with quote

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

View user's profile Send private message Send e-mail

...
PostPosted: Wed May 19, 2004 5:39 am     Reply with quote

no, I dont have eeprom (pic12c508a)

(I edited the topic, to make myself clear, read it )
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group