View previous topic :: View next topic |
Author |
Message |
Guest
|
Sleep function |
Posted: Mon Mar 26, 2007 12:58 pm |
|
|
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
|
|
Posted: Mon Mar 26, 2007 1:18 pm |
|
|
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
|
|
Posted: Mon Mar 26, 2007 4:09 pm |
|
|
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. |
|
|
|