HI all,

Stumped on a PIC10F222 not running the same after coming out of SLEEP or NAP.

After a reset, the led's cycle as expected..... ONCE!
After that, the only one to toggle is on GPIO2 (Green on pin 4).

You can see the rem'd commands for SLEEP and NAP, when one or the other are used instead of the PAUSE, it only cycles the other 2 leds on the first pass. Since the green led still cycles, one can guess that it is coming out of its nap. but why do I loose 2 of the ports?

I am definitely stumped.
'                        10F222 (SOT23-6)                 
'                 -----------u-----------           
' O led cath     -|G0/A0/PGD   G3/MCLR/Vpp|-  10k pull-up     
'                 -|Vss(-)           Vdd(+) |-        
' R led cath     -|G1/A1/PGC   G2/T0CKI/O4|-  G led cath   
'                   -----------------------         
define OSC 4
DEFINE OSCCAL_1K    1           ' read OSCCAL data and use
OPTION_REG  = 000000               ' 1:2, timer off
ADCON0    = 0               ' All digital for GPIO<0-3>
Delay        var        byte        ; used to adjust the delay time
GPIO.0 = 0             'Orange led ON
pause 50
GPIO.0 = 1             'Orange led OFF
GPIO.2 = 0             ' Green led ON
for delay = 0 to 50
GPIO.1 = 0             'Red led ON
pause 20
GPIO.1 = 1             'Red led OFF
pause 20
next Delay
GPIO.2 = 1             'Green led OFF
'pause 1000           'THIS WORKS
'nap 6                 'NO WORKIE
sleep 1                'NO WORKIE
goto Main
I would love to understand this. Any takers?