Nexcom EBC575 Series Manual page 77

Table of Contents

Advertisement

Initialize the SQW of RTC (set SQW output period = 0.5 second)
To initialize the SQW of RTC processor 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.
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.
Note:
Before running WDT, you must clear WDT working mode. The initial value of WDT Control Register
is shown as follows:.
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:
EBC575 User's Manual
; (General SQW = 0.5 Sec.)
Mov dx, 70h
Mov ax, 0Ah
Out dx, al
; Out port 70h = 0Ah
Mov dx 71h
Mov as 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)
Mov dx, F2h
; Setting the WDT configuration port
In
al, dx
; Setting the WDT Control Register as AL
Mov
al, 0h
Register
; Setting initial value = 0 for the WDT Control
77
Appendix B

Advertisement

Table of Contents
loading

Table of Contents