Example

  RESETWDT

Function
Resets the SX Watchdog Timer.

Explanation
When the watchdog timer is enabled (through the DEVICE directive), the RESETWDT instruction must be used periodically to clear the timer in order prevent a device reset. If the program becomes stuck and RESETWDT instruction does not get called in time the watchdog timer will reset the SX.

An internal timer controls the watchdog timeout. By setting bit 3 (PSA) of the OPTION register, bits 2..0 (PS2..PS0) can be used to set the watchdog timeout period.

 PS2 PS1 PS0 Scale Period
0 0 0 1:1 18 ms
0 0 1 1:2 37 ms
0 1 0 1:4 73 ms
0 1 1 1:8 146 ms
1 0 0 1:16 293 ms
1 0 1 1:32 585 ms
1 1 0 1:64 1.2 s
1 1 1 1:128 2.3 s


Reated instructions: END and SLEEP