On Thu, 28 Jan 1999 10:31:51 +1100 Tony Nixon writes: >I'm not sure if the stack pointer is 'cleared' on any reset. It is >just >a circular buffer and it is up to you to manage the pointer position. >ie, not too many returns from a subroutine etc. On powerup, it may be >at >a random position, but I don't think it would change on a WDT reset. There is no need to clear it. I don't think the PIC logic ever clears it. It should hold the same data after a reset, but that is definitely something you try only when you really *have* to. There is certainly no guarantee that anything in particular will remain in the stack after a reset. >Sorry. Perhaps it is waking up, but not responding to your code the >way >you expect. I would agree, perhaps Alice is misdiagnosing the problems. Don't worry about the stack, where ever you CALL, so the PIC will RETURN, up to 8 levels anyway. If you're using an xtal oscillator instead of RC, try removing the crystal circuit and supplying an external clock to X1. If the PIC is asleep, nothing should come out X2. If awake (and/or held in MCLR reset), the clock frequency will appear. If everything seems to work now, the oscillator may have been dodgy and not restarting after wakeup. ___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com/getjuno.html or call Juno at (800) 654-JUNO [654-5866]