Von: M. Adam Davis > What are you doing to determine whether it wakes bakc up or not? I didn't > see any code included which would check the status of the pd and other > such flags. > > The code below will go to sleep, wake up, and go back to sleep again. You > aren't giving it anything to do before or after it sleeps. > > -Adam > I checked the status with BTFSS STATUS, NOT_PD GOTO Start In PowerOn: i make my initializing, i make my work between Start: and the SLEEP. When the WDT times out, the PIC is reseted and start at address 0. The code works fine with 16C84. Isn4t this right? Stefan LIST P = 12C508 RADIX DECIMAL __CONFIG _IntRC_OSC & _WDT_ON & _CP_OFF & _MCLRE_OFF __IDLOCS H'0014' #include "P12C508.INC" CBLOCK 0x07 ENDC ORG 0 MOVWF OSCCAL ; Here i test if the PIC is powered on or wakes up from SLEEP BTFSS STATUS, NOT_PD GOTO Start PowerOn: ; snip ; Power On ; Here i make my initializing after Power On Start: ; snip ; Here i do my work... MOVLW 10111111b ; NOT_GPWU, GPPU, T0CS, T0SE, PSA, PS2, PS1, PS0 ; Pull-Ups enabled, Prescaler 1:128 OPTION SLEEP END -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics