User`s manual

- 58 -
Appendix
4.5 Watchdog Timer (WDT) Setting
WDT is widely used for industry application to monitoring the activity
of CPU. Application software depends on its requirement to trigger WDT with
adequate timer setting. Before WDT time out, the functional normal system
will reload the WDT. The WDT never time out for a normal system. Then, WDT
will time out and reset the system automatically to avoid abnormal operation.
This board supports 255 levels watchdog timer by software
programming. Below are the source codes written in assembly & C, please
take them for WDT application examples.
Assembly Code
;-- Initial W83627hf --
mov AX, 2Eh
mov DX, AX
mov AL, 87h
out DX, AX ;
out DX, AX ; initial W83627HF start
;--
mov AX, 2Eh
mov DX, AX
mov AL, 2Bh
out DX, AL ; Select CR2B
mov AL, 00h
inc DX
out DX, AL ; Set CR2B bit 4=0, PIN89=WDTO
;--
mov AX, 2Eh
mov DX, AX
mov AL, 07h
out DX, AL ; Point to Logical Device Selector
mov AL, 08h
inc DX
out DX, AL ; Select Logical Device 8
;--
mov AX, 2Eh
mov DX, AX
mov AL, 30h
out DX, AL ; select CR30
mov AL, 01h
inc DX
out DX, AL ; update CR30 to 01h