beautypg.com

AAEON ETX-945GSE User Manual

Page 39

background image

E T X C P U M o d u l e

E T X - 9 4 5 G S E

Appendix A Programming the Watchdog Timer

A-6

A.2 W83627HG Watchdog Timer Initial Program

Example: Setting 10 sec. as Watchdog timeout interval

;///////////////////////////////////////////////////////////////////////////////////////////////

Mov dx,2eh

;Enter W83627HG config mode

Mov al,87h

(out 87h to 2eh twice)

Out dx,al

Out dx,al

;///////////////////////////////////////////////////////////////////////////////////////////////

Mov al,07h

Out dx,al

Inc dx

Mov al,08h

;Select Logical Device 8 (GPIO Port

2)

Out dx,al

;///////////////////////////////////////////////////////////////////////////////////////////////

Dec dx

Mov al,30h

;CR30 (GP20~GP27)

Out dx,al

Inc dx

Mov al,01h

;Activate GPIO2

Out dx,al