Peak 602VL User's Guide
Rev. B0
Dec. 2000
Apendix
••••
Clear the WDT
Repeatedly read WDT Configuration Port and the interval cannot be longer than the preset time,
otherwise, the WDT will generate NMI or Reset signal for the system.
The following is an example of
clear the WDT program
in Intel 8086 assembly language.
; ( Clear the WDT)
; ( Clear the WDT)
; ( Clear the WDT)
; ( Clear the WDT)
Mov dx, F2h ; Setting the WDT configuration port
Mov dx, F2h ; Setting the WDT configuration port
Mov dx, F2h ; Setting the WDT configuration port
Mov dx, F2h ; Setting the WDT configuration port
In al, dx
In al, dx
In al, dx
In al, dx
Note:
Before running WDT, you must clear the WDT. It means to make sure the initial value is zero
before enabling the WDT.
••••
WDT Control Register (Write to WDT configuration port)
You can set the WDT Control Register to control the WDT working mode.
The initial value of the WDT Control Register is as the following.
; (Setting the WDT Contro
; (Setting the WDT Contro
; (Setting the WDT Contro
; (Setting the WDT Control Register as AL)
l Register as AL)
l Register as AL)
l Register as AL)
Mov
Mov
Mov
Mov
al, 0h ; Setting initial value = 0 for the WDT Control Register
al, 0h ; Setting initial value = 0 for the WDT Control Register
al, 0h ; Setting initial value = 0 for the WDT Control Register
al, 0h ; Setting initial value = 0 for the WDT Control Register
You must plan the option of following:
1. Select NMI or Reset: decide D4 value in F2h.
i.e. Setting D4 = 0, then it select Reset
AND
AND
AND
AND
al, 11101111b ; Select Reset
al, 11101111b ; Select Reset
al, 11101111b ; Select Reset
al, 11101111b ; Select Reset
i.e. Setting D4 = 1, then it select NMI
OR
OR
OR
OR
al, 00010000b ; Select NMI
al, 00010000b ; Select NMI
al, 00010000b ; Select NMI
al, 00010000b ; Select NMI
2. Select the time-out intervals of WDT (decide the values of D2, D1, D0 in F2h).
Example: D2~D0 = 0, the time-out interval will be 64 sec.
AND
AND
AND
AND
al, 11111000b ; Setting the time
al, 11111000b ; Setting the time
al, 11111000b ; Setting the time
al, 11111000b ; Setting the time-
--
-out interval as
out interval as
out interval as
out interval as 64 sec.
64 sec.
64 sec.
64 sec.
3. Enabled or Disabled the WDT ( decide D3 value in F2h).
i.e. D3=0, Disabled the WDT
AND
AND
AND
AND
al, 11110111b ; Disable the WDT
al, 11110111b ; Disable the WDT
al, 11110111b ; Disable the WDT
al, 11110111b ; Disable the WDT
i.e. D3=1, Enabled the WDT
OR
OR
OR
OR
al, 00001000b ; Enable the WDT
al, 00001000b ; Enable the WDT
al, 00001000b ; Enable the WDT
al, 00001000b ; Enable the WDT