Example Program - Advantech AiMC-2000 User Manual

Fanless embedded
Table of Contents

Advertisement

A.1.3

Example Program

1.
Enable the watchdog timer and set the timeout interval as 10 seconds
;-----------------------------------------------------------
Mov dx,2eh; unlock NCT6106D
Mov al,87h
Out dx,al
Out dx,al
;-----------------------------------------------------------
Mov al,07h; select the watchdog timer registers
Out dx,al
Inc dx
Mov al,08h
Out dx,al
;-----------------------------------------------------------
Dec dx; enable the watchdog timer function
Mov al,30h
Out dx,al
Inc dx
Mov al,01h
Out dx,al
;-----------------------------------------------------------
Dec dx; set the unit of measurement as seconds
Mov al,0f0h
Out dx,al
Inc dx
In al,dx
And al,not 08h
Out dx,al
;-----------------------------------------------------------
Dec dx; set the timeout interval as 10 seconds and start counting
Mov al,0f1h
Out dx,al
Inc dx
Mov al,10
Out dx,al
;-----------------------------------------------------------
Dec dx; lock NCT6106D
Mov al,0aah
Out dx,al
2.
Enable the watchdog timer and set the timeout interval as 5 minutes
;-----------------------------------------------------------
Mov dx,2eh; unlock NCT6106D
Mov al,87h
Out dx,al
Out dx,al
43
AiMC-2000 User Manual

Advertisement

Table of Contents
loading

Table of Contents