Exact match. Not showing close matches.
PICList
Thread
'[SX] Watchdog timer question'
2007\03\01@003259
by
JCCraign/a
|
|
I'm using an SX48 Proto Board and want my program to use SLEEP to go into a low power mode, with the watchdog timer causing it to wake and check some peripherals every so often. If no signals change then it should go back to SLEEP. But I'm having trouble getting the watchdog timer to work. I've simplified my code to the following, which doesn't even use the SLEEP command yet. Note that the RESETWDT command is commented out, so I'd expect a reset or wake up within a second or two. Nothing happens though. At startup the LEDs all come on for 1/4 second, then most of them go out as expected, but they then stay unlit forever. The DO-LOOP never appears to exit, so the watchdog timer action doesn't seem to be happening. Much of this code is identical to the example in the Help documentation under the subject "RESETWDT Example". Can anyone see what it is I must be overlooking?
'------- Device Settings
DEVICE SX48, OSCHS3
FREQ 50_000_000
ID "Test"
'------- Start of Program
PROGRAM Start
'------- Initialization
Start:
TRIS_D = %00000000 'Row of LEDs are on RD pins
OPTION = %11111110 'Same as in RESETWDT example
RD = %11111111 'All 8 LEDs go on at startup
PAUSE 250 'for about .25 seconds
DO
RD = %10000001 'Most of the LEDs go out
PAUSE 250
'RESETWDT 'Without this should get timeouts
LOOP
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=175198
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)
2007\03\01@004544 by peterverkaikn/a
|
|
You must enable the watchdog through the device directive
eg.
device SX48,oschs1,watchdog ;sx device options
regards peter
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=175198#m175199
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)
2007\03\01@005320 by JCCraign/a
|
|
Thanks, I figured it must be something simple like that (usually is! -John
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=175198#m175200
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)
More... (looser matching)
- Last day of these posts
- In 2007
, 2008 only
- Today
- New search...