
User’s Manual
Custom Embedded Solutions
WIN Enterpris es, Inc ., s ales @win-ent.c om
www.win-ent.com
, (978) 688-2000
51
count with the new value
AAH
-----
Write this address to I/O port 2EH to lock watchdog timer.
3. Example program 1
Enable watchdog timer and set 10 seconds as timeout interval and issue
KBRST# as the time-out event occur.
;---------------------------------------------------------------------------------
;Enter the extended function mode, interruptible double-write
;---------------------------------------------------------------------------------
MOV DX,2EH ; Unlock W83627EHG
MOV AL,87H
OUT DX,AL
OUT DX,AL
;---------------------------------------------------------------------------------
; Configure logical device 8
;---------------------------------------------------------------------------------
MOV AL,07H
OUT DX,AL ; Point to Logical Device Number Reg.
INC DX
MOV AL,08H
OUT DX,AL ; Select logical device 8
;---------------------------------------------------------------------------------
; Set second as counting unit and KBRST# time-out event
;---------------------------------------------------------------------------------
DEC DX
MOV AL,F5H
OUT DX,AL ; Select CRF5
INC DX
IN AL,DX
AND AL,F5H ; Set Watchdog time-our to second mode
OR AL,02H
OUT DX,AL ; Enable the WDTO# output low pulse to KBRST#
;----------------------------------------------------------------------------------------
; Load 10 seconds to Watchdog Counter and start counting down