Peak 650 User's Guide
Rev. A
October 2000
Apendix
Watch Dog Timer Programming Procedure
••••
Power on or reset the system
The initial value of WDT Control Register (D4~D0) is zero, when power is on or reset the system. The
following means the initial value of WDT ( 00000000b ) :
Bit
Value
Mean
4
0
Select Reset
3
0
Disable Watch Dog Timer
2, 1, 0 0 0 0
Select 64 second
••••
Initialize the SQW of RTC (set SQW output period=0.5 second)
To initialize the SQW of RTC Component is to set the SQW signal which is output period=0.5 second.
It offers the basic frequency of the WDT counter.
The following is an example of initializing the SQW signal program in Intel 8086 assembly language.
; (G
; (G
; (G
; (Generate SQW = 0.5 Sec.)
enerate SQW = 0.5 Sec.)
enerate SQW = 0.5 Sec.)
enerate SQW = 0.5 Sec.)
Mov
Mov
Mov
Mov
dx, 70h
dx, 70h
dx, 70h
dx, 70h
Mov
Mov
Mov
Mov
ax, 0Ah
ax, 0Ah
ax, 0Ah
ax, 0Ah
Out
Out
Out
Out
dx, al
dx, al
dx, al
dx, al
; Out port 70h = 0Ah
; Out port 70h = 0Ah
; Out port 70h = 0Ah
; Out port 70h = 0Ah
Mov
Mov
Mov
Mov
dx, 71h
dx, 71h
dx, 71h
dx, 71h
Mov
Mov
Mov
Mov
ax, 2Fh
ax, 2Fh
ax, 2Fh
ax, 2Fh
Out
Out
Out
Out
dx, al
dx, al
dx, al
dx, al
; Out port 71h = 2Fh
; Out port 71h = 2Fh
; Out port 71h = 2Fh
; Out port 71h = 2Fh
; (enable the SQW output)
; (enable the SQW output)
; (enable the SQW output)
; (enable the SQW output)
Mov
Mov
Mov
Mov
dx, 70h
dx, 70h
dx, 70h
dx, 70h
Mov
Mov
Mov
Mov
ax, 0Bh
ax, 0Bh
ax, 0Bh
ax, 0Bh
Out
Out
Out
Out
dx, al
dx, al
dx, al
dx, al
; Out port 70h = 0Bh
; Out port 70h = 0Bh
; Out port 70h = 0Bh
; Out port 70h = 0Bh
Mov
Mov
Mov
Mov
dx, 71h
dx, 71h
dx, 71h
dx, 71h
Mov
Mov
Mov
Mov
ax, 0Ah
ax, 0Ah
ax, 0Ah
ax, 0Ah
Out
Out
Out
Out
dx, al
dx, al
dx, al
dx, al
; Out port 71h = 0Ah
; Out port 71h = 0Ah
; Out port 71h = 0Ah
; Out port 71h = 0Ah