I can't get this PIC to SLEEP with the following program:
CMCON = %00000111
TRISIO = %001100
OPTION_REG = %01000000
PIR1 = 0
GPIO = 0
@ DEVICE MCLR_OFF, INTRC_OSC, WDT_OFF, BOD_OFF, PWRT_OFF, PROTECT_OFF
'GPIO.0 =
'GPIO.1 = LED HIGH OUT
'GPIO.2 = SWITCH HIGH INPUT
'GPIO.3 = MCLR TIED HIGH
'GPIO.4 =
'GPIO.5 =
GPIO.1 = 1
PAUSE 100
INTCON = %00000000
FLAGS = 0
@SLEEP
GPIO.1 = 0
The LED goes on briefly, and then turns off. If it really does go to SLEEP, then something is waking it up. Help please!
Bookmarks