Hi Ron,
You're perfectly right with the '690 ... but, care ... GIE settings do not have the same effects for the '628 ... and GIE *must* be set to enter sleep ( sleep ignored if GIE = 0 ) .
Alain
Last edited by Acetronics2; - 12th May 2007 at 17:04.
************************************************** ***********************
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 " !!!
*****************************************
Hi, Charudatt
Do not worry !!! This is certainly one of the least documented feature of PBP ...
DEFINE INTHAND _INTER ...
1) keeps prog mem locations 2 and 3 free ...
2) places a GOTO _INTER at location 4 ... or a bit further if more than 1 program page ...and COULD need context saving.
_INTER ( Note the Leading Underscore ) is the PBP "INTER:" Label readable by Assembler ...
Consider it as a "classical" GOTO ... but you reach it when an "interrupt reason" occurs ... no latency then.
INIT (Without Underscore !!! ) is the first ASSEMBLER line your Program really executes at power ON ...
So, as is ... you can i.e. restart your PIC, ... without using MCLR - if not disposable !!!
... or goto the label you want !!!
Alain
************************************************** ***********************
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 " !!!
*****************************************
Allain,
I was right. Clearing GIE does work as it does on the '690. It will wake and continue without needing an interrupt handler.
Ron
<table><td>Vermont : 1
France : 0</td><td></td></table>
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
************************************************** ***********************
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 " !!!
*****************************************
The little window says if GIE is 0 and both the flag bit and enable bit are set, it will treat the sleep command as a nop. If the flag bit is cleared, it will sleep. It IS confusingly written!
Hello Ron and Other,
I did not understand the Int_handler part. You mean to say , declare a Int_handler without a lable and make the pic reset.
Well setting GIE made it to go to sleep (LED not blinking but current 6mA) but did not come out of it.
any further help?
regards
Bookmarks