beautypg.com

AAEON AEC-6612 Rev.A User Manual

Page 46

background image

E m b e d d e d C o n t r o l l e r

A E C - 6 6 1 2

Appendix A Programming the Watchdog Timer

A-7

A.2 W83627DHG Watchdog Timer Initial Program

Example: Setting 10 sec. as Watchdog timeout interval

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

Mov dx,2eh

;Enter W83627DHG 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