71 Appendix A
Table A.1: Watchdog timer registers
A.1.4 Example Program
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
F7 (hex) read/write Bit 6: Write 1 to enable key-
board to reset the timer, 0
to disable.[default]
Bit 5: Write 1 to generate a
timeout signal immediately
and automatically return to
0. [default=0]
Bit 4: Read status of watch-
dog timer, 1 means timer is
""time out""."
AA (hex) ----- Write this address to I/O
port 2E (hex) to lock the
watchdog timer.2