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
Stefan Reinersch wrote:
{Quote hidden}>
> Von: M. Adam Davis <
.....adavisKILLspam
@spam@UBASICS.COM>
>
> > Can you send an example piece of code (well commented) including
> > configuration settings?
> >
> > Does the chip work with other programs? Have you taken care not to lose
> > the OSCCAL value?
>
> The chip wotk with other programs, but i have no success with WDT.
>
> Hier is a piece of code:
>
> 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
>
> BTFSS STATUS, NOT_PD
> GOTO Start
>
> PowerOn:
> ; snip
> ; Power On
>
> Start:
> ; snip
>
> 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
--
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