Quote Originally Posted by longpole001 View Post
....i have 4 sleep types at the moment with only 2 times settings for the WDT , and they change based on options selected and should not change that often after setup , but the ability to change them is a good one
Sounds like you are wanting to deal with asynchronous events. If that is the case, then the "EXIt BY INTERRUPT" feature should be used.

3.5.1 EXIT BY INTERRUPT

Any of the available interrupt sources can cause the
device to exit from an Idle mode or the Sleep mode to
a Run mode. To enable this functionality, an interrupt
source must be enabled by setting its enable bit in one
of the INTCON or PIE registers. The exit sequence is
initiated when the corresponding interrupt flag bit is set.

The instruction immediately following the SLEEP
instruction is executed on all exits by interrupt from Idle
or Sleep modes. Code execution then branches to the
interrupt vector if the GIE/GIEH bit of the INTCON
register is set, otherwise code execution continues
without branching.