Originally Posted by
charudatt
' Set Sleep Interrupts
' --------------------
INTCON=%00011000 ' Interrupt Control Register
' 7=0 - GIE - Global Interrupt Enable
' 6=0 - PEIE - Peripheral Interrupt Enable
' 5=0 - TOIE - TMR0 Overflow Interrupt Enable
' 4=1 - INTE - RB0/INT Enable
' 3=1 - RBIE - PORTB change interrupt Enable
' 2=0 - TOIF - TMR0 Overflow Flag
' 1-0 - INTF - RB0/Ext Interrupt Flag
' 0=0 - RBIF - PORTB Interrupt Flag
OPTION_REG.6=1 ' 1=RB0 Rising-Edge Trigger, 0=Falling-Edge Trigger
?
Hi, Charudatt
May be you could simply enable the interrupts before sleeping ... might work better.
Yess GIE = 1 ... ( INTCON.7 = 1 )
oh, oh ... you are still asleep ???
Alain
Last edited by Acetronics2; - 12th May 2007 at 13:34.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks