Here's another issue i've been running into. I'm using the PortB.0 interrupt in my program to wake up from sleep. Outside of the interrupt handler, I'm using the sleep command as seen below and disabling the 0 interrupt to force it to sleep a certain amount of time (TimeDely). If "timedely" is 300, I would expect it to sleep for 5 minutes, but its more like 1 and a half minutes. Could it be that some other interrupt is waking it up from sleep? This is using the internal ossilator also.
ghoot
GIE=0 'turn off global interupts.
While GIE=1:GIE=0:Wend ' make sure they are off
Input PORTB.0 ' Set PortB.0 as an Input
RBPU=0 ' Enable PortB Pullup Resistors
INTEDG=0 ' Trigger on the falling edge of RB0
NTF=0 ' Clear the RB0/INT interrupt flag
RBIF=0 ' Clear the PORTB[4..7] interrupt flag
INTE=1 ' Enable RB0/INT interrupt
RBIE=1 ' Enable PortB[4..7] interrupt
ON INTERRUPT GoTo myint
'+++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++
lowpower:
INTE=0 ' Disable RB0/INT interrupt
Sleep TimeDely
INTEDG=0
INTF=0 ' Clear the RB0/INT interrupt flag
INTE=1 ' Enable RB0/INT interrupt
Sleep 7200 - TimeDely
'DO SOME OTHER STUFF HERE
GoTo lowpower
'+++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++
Disable
myint:..............
Bookmarks