113
A
Watchdog Sample Code
Appendix A - Watchdog Sample Code
;Software programming example:
;----------------------------------------------------------------
;(1) Enter Superio Configuration mode
;----------------------------------------------------------------
MOV
DX,4EH
MOV
AL,87H
OUT
DX,AL
OUT
DX,AL
;--------------------------------------------------------------------------------
;(2) Configuration Logical Device 8, register CRF5/CRF6/CRF7
;
(WDT count mode / count value / control mode)
;--------------------------------------------------------------------------------
MOV
DX,4EH
MOV
AL,07H
;Ready to Program Logical Device
OUT
DX,AL
MOV
DX,4FH
MOV
AL,08H
;Select Logical Device 8
OUT
DX,AL
MOV
DX,4EH
MOV
AL,F5H
;Select CRF5
OUT
DX,AL
MOV
DX,4FH
IN
AL,DX
OR
AL,08H
;Set CRF5[Bit:3]=1, WDT count mode=Minute mode
OUT
DX,AL
MOV
DX,4EH
MOV
AL,F6H
;Select CRF6
OUT
DX,AL