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 support@ccsinfo.com

PIC10F200 WDT disable during runtime

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



Joined: 22 Dec 2003
Posts: 82

View user's profile Send private message

PIC10F200 WDT disable during runtime
PostPosted: Thu Nov 01, 2012 1:54 pm     Reply with quote

I use the WDT during the program run.
In some cases I want to put the 10F200 into a sleep for a very long time without wakeup on WDT but only by GPIO change.
Is there a way to disable the WDT during program run, after it was enabled?
Code:

#fuses WDT

setup_wdt(WDT_2304MS);


Thanks.
Ttelmah



Joined: 11 Mar 2010
Posts: 19347

View user's profile Send private message

PostPosted: Thu Nov 01, 2012 3:44 pm     Reply with quote

No.
This is a 'read the data sheet' one.
On these chips, the watchdog is only disabled/enabled by a fuse. A lot of the larger chips offer a 'soiftware' option to allow the watchdog to be disabled in code, but not this one.
However it is very easy to test using restart_cause, and if this is from a watchdog restart, just go to sleep again. The CPU need only wake for a handful of instructions every (approx) 2.3 seconds, and the power consumption of this is tiny. Got units waking like this that have been running for years on a single small lithium battery....

Best Wishes
edi



Joined: 22 Dec 2003
Posts: 82

View user's profile Send private message

PostPosted: Thu Nov 01, 2012 4:09 pm     Reply with quote

I understand it from the data sheet.
But as you mention I looked for a trick to overcome it.

Thanks a lot.
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