User`s manual
SBC84833 Series All-In-One Capa Board User’s Manual
Watchdog Timer
70
mov al,Nh ;N=00h or 08h(See below Note)
out dx,al
;Set base timer :
mov dx,2Eh
mov al,0F6h
out dx,al
mov dx,2Fh
mov al,Mh ;M=00h,01h,02h,.....FFh (Hex),Value=0 to 255
out dx,al ; (See below
Note)
;Disable WDT:
mov dx,2Eh
mov al,30h
out dx,al
mov dx,2Fh
mov al,00h ;Can be disable at ant time
out dx,al
Note:
When N’s value is 00h, the time base is set second.
M = 00: Time-out Disable
01: Time-out occurs after 1 second
02: Time-out occurs after 2 seconds
03: Time-out occurs after 3 seconds
.
.
FF: Time-out occurs after 255 seconds
When N’s value is 08h, the time base is set minute.
M = 00: Time-out Disable
01: Time-out occurs after 1 minute
02: Time-out occurs after 2 minutes
03: Time-out occurs after 3 minutes
.
.
FFh: Time-out occurs after 255 minutes
z Sample of Watchdog application
Assume there is program A which needs to maintain running in a
system. The value of Watchdog Timer must be set bigger than the
running time of program A. Then, after the running time of program A
is finished, either to disable or to reset watchdog timer.