PEAK 636F User‘s Guide
Jumper Setting and Pin Assignment 2-
8
; (Generate SQW = 0.5 Sec.)
Mov dx,
70h
Mov ax,
0Ah
Out
dx, al
; Out port 70h = 0Ah
Mov dx,
71h
Mov ax,
2Fh
Out
dx, al
; Out port 71h = 2Fh
; (enable the SQW output)
Mov dx,
70h
Mov ax,
0Bh
Out
dx, al
; Out port 70h = 0Bh
Mov dx,
71h
Mov ax,
0Ah
Out
dx, al
; Out port 71h = 0Ah
••••
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)
Mov dx, F2h ;Setting the WDT configuration port
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 Control Register as AL)
Mov 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 F2.
i.e. Setting D4 = 0, then it select Reset
AND al, 11101111b ; Select Reset
i.e. Setting D4 = 1, then it select NMI
OR al, 00010000b ; Select NMI
2. Select the time-out intervals of WDT (decide the values of D2, D1, D0 in F2 )
Example: D2~D0 = 0, the time-out interval will be 64 sec.
AND al, 11111000b ; Setting the time-out interval as 64 sec.
3. Enable or Disable the WDT ( decide D3 value in F2)
i.e. D3=0, Disable the WDT
AND al, 11110111b ; Disable the WDT
i.e. D3=1, Enable the WDT
OR al, 00001000b ; Enable the WDT