NAP puts the PIC to sleep for ONE watchdog timer period.
This is similar to the PIC's SLEEP instruction except that NAP sets the watchdog period first.
Depending on the PIC being used, periods are ~18mS or greater per NAP.
SLEEP uses multiple WDT periods, and approximates the requested time to 1 second resolution.
Thousands of WDT periods may be required, depending on the requested SLEEP time.
On each WDT timeout, the PIC wakes up ... checks to see if the SLEEP time is complete ... if not it decrements a counter and goes back to sleep again.
Bookmarks