Quote Originally Posted by Acetronics View Post
Heuuu

No GIE = No Sleep ( RTFDatasheet ... $ 14.8.1 - Greyed Note ), so we set GIE Bit

Then ... Executes the 1St NOP

Then ... Branches to location 0004 ...

But there is a supposed Interrupt stubb here instead of falling into the "program" ...

a single " DEFINE INTHAND INIT " without any interrupt stubb ( LOL ! ) would push the libs away from the 4 first program locations ... and allow restarting the PIC as a first power up ...

We could also Branch to the "Pause 100" ... to have some visual effect before re-entering sleep ... ( wich is better ...I think)

Sooo ...

we add :

DEFINE INTHAND _BLINK ' near top of program

and

BLINK:

Before

Pause 100 ' Needed for system Wake-Up
HIGH LED : PAUSE 200 : LOW LED
GOTO CYCLE




I am right, Mel ???

Alain
I am using the '690. In that FM, the processor will still wake from sleep if the flag is set without the GIE set. With the GIE set you have to service the interrupt. Without, it starts up right after the sleep command.

Ron