Protech Systems SG-G151 User Manual page 121

15” intel atom x7-e3950 / celeron j3455 processor fanless and all-around ip66 panel pc
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 ------------------------------
dec
dx
mov
al,
30h
out
dx,
al
inc
dx
mov
al,
01h
out
dx,
al
; ---------------- Set timeout interval as 30seconds and start counting --------------
dec
dx
mov
al,
F6h
out
dx,
al
inc
dx
mov
al,
1Eh
out
dx,
al
;------------------------------- Enable Watch PME--------------------------------------------
dec
dx
mov
al,
FAh
out
dx,
al
inc
dx
in
al,
dx
or
al,
51h
out
dx,
al
;-------------------------- Set second as counting unit --------------------------------------
dec
dx
mov
al,
F5h
out
dx,
al
inc
dx
in
al,
dx
and
al,
DEh
out
dx,
al
;-------------------------- Start the watchdog timer --------------------------------------
or
al,
20h
out
dx,
al
;---------------------------------Exit the extended function mode -------------------------
dec
dx
mov
al,
AAh
out
dx,
al
SG-G151 USER MANUAL
Appendix B Technical Summary
Page: B-21

Advertisement

Table of Contents
loading

Table of Contents