NAR-5050/5070 Series User
’
s Manual
32
; Data_IO_Port
dw 002Fh
; SWC_LDN db 04h
; SIOCFG2
db 22h
; WDCTL
db 10h
; WDTO
db 11h
; WDCFG
db 12h
;
; Input : None
; Return : None
WDT disable PROC near
push dx
push ax
push bx
;Disable 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
;Disable 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