Protech Systems BA-2501 User Manual page 141

Hide thumbs Also See for BA-2501:
Table of Contents

Advertisement

Code example for watch dog timer
Enable watchdog timer and set timeout interval to 30 seconds.
; ------------------------- Enter to extended function mode -------------------------------
mov
dx, 2eh
mov
al,
87h
out
dx, al
out
dx, al
; ----------------------- Select Logical Device 7 of watchdog timer ---------------------
mov
al,
07h
out
dx, al
inc
dx
mov
al,
07h
out
dx, al
;---------------------------- Enable Watch dog feature -------------------------------------
mov
al,
030h
out
dx, al
inc
dx
mov
al,
01h
out
dx, al
; -------------------------- Set timeout interval as 30 seconds ----------------------------
dec
dx
mov
al,
0F6h
out
dx, al
inc
dx
mov
al,
1Eh
out
dx, al
;------------------------------- Enable Watch PME--------------------------------------------
dec
dx
mov
al,
0FAh
out
dx, al
inc
dx
in
al,
dx
or
al,
51h
out
dx, al
;------------------- Set second as counting unit and start counting --------------------
dec
dx
mov
al,
0F5h
out
dx, al
inc
dx
in
al,
dx
and
al,
0F7h
or
al,
20h
out
dx, al
;---------------------------- Exit the extended function mode ------------------------------
dec
dx
mov
al,
0AAh
out
dx, al
BA-2501 SERIES USER MANUAL
Appendix A Technical Summary
Page: A-15

Advertisement

Table of Contents
loading

Table of Contents