English
Language : 

SN8P2608 Datasheet, PDF (74/112 Pages) SONiX Technology Company – 8-Bit Micro-Controller
¾ Example: Clear watchdog timer by @RST_WDT macro.
Main:
@RST_WDT
…
…
CALL
CALL
…
…
JMP
SUB1
SUB2
MAIN
; Clear the watchdog timer.
SN8P2608
8-Bit Micro-Controller
Watchdog timer application note is as following.
z Before clearing watchdog timer, check I/O status and check RAM contents can improve system error.
z Don’t clear watchdog timer in interrupt vector and interrupt service routine. That can improve main routine fail.
z Clearing watchdog timer program is only at one part of the program. This way is the best structure to enhance the
watchdog timer function.
¾ Example: An operation of watchdog timer is as following. To clear the watchdog timer counter in the top
of the main routine of the program.
Main:
Err:
…
…
JMP $
; Check I/O.
; Check RAM
; I/O or RAM error. Program jump here and don’t
; clear watchdog. Wait watchdog timer overflow to reset IC.
Correct:
B0BSET
…
CALL
CALL
…
…
…
JMP
FWDRST
SUB1
SUB2
MAIN
; I/O and RAM are correct. Clear watchdog timer and
; execute program.
; Only one clearing watchdog timer of whole program.
SONiX TECHNOLOGY CO., LTD
Page 74
Version 1.4