Thinking about it... there IS a way...
The WDT (if set) will Time-Out when the PIC is put to SLEEP and awake the PIC. By assigning the prescaler to the WDT, you can control how long the PIC will sleep before it's woken. Simply increment a counter each time the PIC wakes to a value closest to your pre-set time. If the count hasn't been reached, the PIC goes straight back to sleep. OK, so you're not going to be sleeping 100% of the Time Period, but sleeping 99.9% of the time is better than consuming power by being awake 100%.
So, in a nutshell, just count the number of WDT wake-up's...
When there's a thought... there's a way...
Bookmarks