A.3 Example Programs

1.Enable watchdog timer and set 10 sec. as timeout interval

;-----------------------------------------------------------

Mov dx,2eh ; Unlock W83627HF

Mov al,87h

Out dx,al

Out dx,al

;-----------------------------------------------------------

Mov al,07h ; Select registers of watchdog timer

Out dx,al

Inc dx

Mov al,08h

Out dx,al

;-----------------------------------------------------------

Dec dx ; Enable the function of watchdog timer

Mov al,30h

Out dx,al

Inc dx

Mov al,01h

Out dx,al

;-----------------------------------------------------------

5 6 MIC-3318 User's Manual

Page 64
Image 64
Advantech MIC-3318 manual Example Programs, Enable watchdog timer and set 10 sec. as timeout interval