Re: PIC12C508A : WDT Reset during sleep problem

From: Eli (eli_at_e-drivetech.com)
Date: 05/24/04


Date: 24 May 2004 00:51:11 -0700

OK, now everything is clear for me.
The PCM16XA0 has a limitation with emulation of wake up from sleep on
GP0/1/3 pins change, therefore the STATUS register always 0.
RTFM problem. :)

Thanks to all those who tried to help me.

Best regards ,
              Eli.

no-one@dont-mail-me.com (Robert Scott) wrote in message news:<40b0bdac.550266@news.provide.net>...
> On 23 May 2004 01:56:10 -0700, eli@e-drivetech.com (Eli) wrote:
>
> >Dear colleagues,
> >
> >I work with ICE2000 (pcm16xa0 & dva12xp80) to emulate PIC12C508A. I've
> >experienced with a very strange problem: after the chip goes to SLEEP,
> >the WDT Reset occures (STATUS = 0 on Reset), whereas it should be only
> >Wake up from sleep !
>
> Not true. The 12C508 always does a reset when it wakes up from sleep.
> There is no option for continuing execution with the instruction after
> the SLEEP instruction. Your only choice is to put code in your reset
> code to check if this is a wake-up from sleep and take appropriate
> action, if needed.
>
> >
> >__CONFIG _CP_OFF & _WDT_ON & _MCLRE_ON & _IntRC_OSC
> >
> >
> >START
> > movwf OSCCAL ; update register with factory cal value
> >; ==========================================================================
> > movlw 0x0f ; Select internal RC,enable pull-ups
> > ; assign prescaller 1:128 to WDT,Wake Up on
> >change
> > option ;
> >
> >;===========================================================================
> >
> > movlw 0xEF ;
> > tris GPIO ; Set GP4[Relay] to output direction
> >
> >LOOP
> >
> > sleep
>
> Any instructions put here will never get executed.
>
> > btfsc GPIO,0 ; Has the DATA_PIN fallen down ?
> > goto LOOP ; No, it is High
> >
> > movlw ...
> >
> >I've tried this code only with ICE, since currently I haven't
> >possibility to burn a real chip.So, perhaps the problem exists only
> >when working with ICE ?
> >
> >Thank you in advance,
> > Eli.
>
> -Robert Scott
> Ypsilanti, Michigan
> (Reply through this forum, not by direct e-mail to me, as automatic reply address is fake.)



Relevant Pages