'Having trouble determining the cause of wake-up fr'
I have an application where I want to put my PIC into sleep mode
and awaken on a toggle of the INT pin. When I run my code without the
watchdog timer, my code works fine. When I chose to enable the watchdog
timer, I added a few lines of code to determine the cause of the wakeup,
if it was due to the watchdog timeout, I would simply put the processor
back to sleep. To check this, I followed the instructions in the manual.
I am using the 16c74. Here is my code
NOP ; 1st instruction after sleep
BTFSS STATUS,4 ; Was the wakeup caused by a watchog timeout?
goto A ; go back to sleep
; stay awake
This did not work, the processor simply would not come out of sleep
mode when I toggle the INT pin. But like I said before this worked
perfectly without the watch dog timer.
I would appreciate any advice. Also just curious, if I set the prescaler
to the WDT to lengthen the period before the WDT timeouts wake the
processer, would I save that much in current consumption. Right now
my PIC uses about 400uA in sleep mode. Just curious if this is normal.
More... (looser matching)
- Last day of these posts
- In 1996
, 1997 only
- New search...