![FabiaTech FX5638 Series User Manual Download Page 64](http://html.mh-extra.com/html/fabiatech/fx5638-series/fx5638-series_user-manual_536439064.webp)
FabiaTech Corporation
Watchdog Timer Enabled
To enable the watchdog timer, you have to output a byte of timer factor to the
watchdog register whose address is 2eh and data port is 2fH. The following is an
Assemble program, which demonstrates how to enable the watchdog timer and
set the time-out period at 28 seconds.
;------------------------------------------------------------------------------------------
; Enter the extended function mode
;------------------------------------------------------------------------------------------
Mov
dx, 2eh
; Enter to extended function mode
Mov
al, 87h
Out
dx,al
Nop
Nop
Mov al,01h
Out
dx,al
Nop
Nop
Mov al,55h
Out dx,al
Nop
Nop
Mov al,55h
Out dx,al
Mov al,22
Out dx,al
Mov
dx,2fh
Mov al,00h
Out dx,al
;--------------------------------------------------------------------------------------------------------------
; Logical device 7, configuration registers Index 72h-Bit 7, 73H (LSB)/74H (MSB)
;--------------------------------------------------------------------------------------------------------------
Mov
dx,2fh
Mov
al,07h ;
Select Logical Device 7 of watchdog timer
Out
dx,al
Mov
dx,2eh
Mov
al,72h
;Index 72h- Time-Out Value and Watchdog Register
Out dx,al
Mov dx,2fh
Or
al,C0h
;Set Bit 7 is 1: Second and Bit6: Enabled Watchdog.
;Or al,40h
;Set Bit 7 is 0: Minute.
Out dx,al
Mov dx,2eh
Mov
al,74h
; Set Timer counter 0100~FF00 (MSB)
Out dx,al
Mov dx,2fh
Mov al,00h
Out dx,al
Mov dx,2eh
Mov
al,73h
; Set Timer counter 0001~00FF (LSB)
Mov dx,2fh
60