NAR-5050/5070 Series User
’
s Manual
26
; Input : DH ; Twd , the Time-out period 0 --> 255 Minutes,
; Return : None
WDT Enable PROC near
push dx
push ax
push cx
push bx
mov ch,dh ; Save dh, Twd , value in ch
;
Enable WDT Step 1: Select multiplex pin,pin55,as WDT output (Set Index-22h_Bit7)
mov dx,Index_IO_Port
; Read SIOCFG2 First
mov al,SIOCFG2
out dx,al
mov dx,Data_IO_Port
in al,dx
or al,80h
; Set Bit7 to 1
mov ah,al
; keep in AH
mov dx,Index_IO_Port
mov al,SIOCFG2
out dx,al
mov dx,Data_IO_Port
mov al,ah
out dx,al
; SIOCFG2_Bit7P1
;
Enable WDT Step 2 : Enable SWC function ( Set SWC_Index-30h_Bit0 )
mov dx,Index_IO_Port
; Point to SWC_LDN ( LDN = 4 )
mov al,07
out dx,al
mov dx,Data_IO_Port
mov al,SWC_LDN
out dx,al
mov dx,Index_IO_Port
; Read Index 30h First
mov al,30h
out dx,al
mov dx,Data_IO_Port
in al,dx
or al,01h
; Set Bit0 to 1
mov ah,al
; keep in AH
mov dx,Index_IO_Port
mov al,30h
out dx,al
mov dx,Data_IO_Port
mov al,ah
out dx,al
; Index30h_bit0P1