FabiaTech Corporation
58
¾
WDT1 setup Step:
1. Write time into register AAh-ACh.
2. Select signal from register A9h.
3. Set register A8h bit 8 to enable WDT1.
To clear the watchdog timer counter:
1. Write any value to register A7H
Watchdog Timer Enabled
To enable the watchdog timer 1 (WDT 1), you have to output a byte of timer factor
to the watchdog ports address is A8h. The following is an Assemble program, which
demonstrates how to enable the watchdog timer 1 and set the time-out period at
4 seconds.
;-----------------------------------
; Enabled Watch dog
;-----------------------------------
Mov
al,40h
Mov
dx,a8h
;IO port A8h Bit 6 set 1
Out
dx,al
Watchdog Timer Trigger
;-------------------------
; Timer Counter
;-------------------------
Mov al,02h
Mov
dx,aah
; IO port AAh set 02h = 4 sec
Out dx,al
;----------------------------------------
; Interrupt or System Reset
;----------------------------------------
Mov al,50h
;Trigger
IRQ7
;Mov
al,d0h ;System Reset
Mov
dx,a9h
; IO port A9h Select Int, Reset, NMI signal
Out
dx,al
;------------------------------------------------
; Trigger (Reset) Watchdog Timer
;------------------------------------------------
Or
al,40h
Mov
dx,aeh
; IO port AEh Trigger Watchdog
Out
dx,al
Watchdog Timer Disabled
To disable the watchdog timer, simply write a 00H to the watchdog register.
;-----------------------------------
; Disabled Watchdog
;-----------------------------------
Mov
al,40h ; IO port A8h disabled Watchdog
Mov dx,a8h
Out
dx,al
Summary of Contents for FB2402
Page 5: ...v Dimension 71 ...
Page 6: ...vi ...
Page 12: ...FabiaTech Corporation 6 ...
Page 26: ...FabiaTech Corporation 20 ...