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

Sleep function

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








Sleep function
PostPosted: Mon Mar 26, 2007 12:58 pm     Reply with quote

Hello all,
I am using a 16F688 and from what I observed is that the Sleep restarts the WDT automatically (as in just before it goes to sleep). Is there anyway to put the micro to sleep without resetting the WDT? I am asking this because I have some conditional functions that will create a delay (few seconds) but I want the PIC to wake up at the same time interval no matter how much time has been taken by the instructions.

Thank you in advance!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 26, 2007 1:18 pm     Reply with quote

The 16F688 say this:
Quote:

The Power-down mode is entered by executing a
SLEEP instruction.

If the Watchdog Timer is enabled:

• WDT will be cleared but keeps running.

That's done in hardware. I don't think you can change this feature
of the PIC.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Mar 26, 2007 4:09 pm     Reply with quote

Quote:
I am asking this because I have some conditional functions that will create a delay (few seconds) but I want the PIC to wake up at the same time interval no matter how much time has been taken by the instructions.
Note that the watchdog on most PICs has a _very_ wide spread between different chips of the same model. If exact timing is really crucial you should consider using timer1 with an external crystal, this timer will continue to count even during sleep and can be used to wake the PIC at exact intervals.
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