User`s manual

135
D
Watchdog Sample Code
Appendix D - Watchdog Sample Code
;Software programming example:
;----------------------------------------------------------------
;(1)Enter Superio Configuration mode
;----------------------------------------------------------------
MOV DX,2Eh
MOV AL,87h
OUT DX,AL
MOV AL,01h
OUT DX,AL
MOV AL,55h
OUT DX,AL
MOV AL,55h
OUT DX,AL
;--------------------------------------------------------------------------
;(2) Configuration Logical Device 7,register CR72 & CR73
; (Watch Dog Timer enable & Time-Out Value Register)
;--------------------------------------------------------------------------
MOV DX,2Eh
MOV AL,07h ;Ready to Program Logical Device
OUT DX,AL
MOV DX,2Fh
MOV AL,07h ;Select Logical Device 7
OUT DX,AL
MOV DX,2Eh
MOV AL,72h ;Select CR72
OUT DX,AL
MOV DX,2Fh
IN AL,DX
OR AL,40h ;Set CR72[Bit:6]=1, WDT output through KRST
enable
OUT DX,AL