In SX Microcontrollers, SX/B Compiler and SX-Key Tool, JCCraig wrote: 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)