Searching \ for '[PIC]:12C508 and Sleep' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: '12C508 and Sleep'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:12C508 and Sleep'
2000\11\09@105524 by Stefan Reinersch

flavicon
face
Hello,

i have a problem with 12C508 and SLEEP. I have WDT enabled, MCRL disabled
and use internal RC oscillator. I assign the prescaler to the WDT, and call
SLEEP. But the PIC doesnt restart.

Any ideas?

Thanks,

Stefan

--
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




2000\11\09@112004 by M. Adam Davis

flavicon
face
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?

-Adam

Stefan Reinersch wrote:
{Quote hidden}

--
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




2000\11\09@115903 by Stefan Reinersch

flavicon
face
Von: M. Adam Davis <spam_OUTadavisTakeThisOuTspamUBASICS.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




2000\11\09@121210 by M. Adam Davis

flavicon
face
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}

--
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




2000\11\09@123653 by Stefan Reinersch

flavicon
face
Von: M. Adam Davis <adavisspamKILLspamUBASICS.COM>


> 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




More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...