Example Program; A.1.3 Example Program - Advantech VPS-3100 User Manual

Table of Contents

Advertisement

A.1.3

Example Program

1.
Enable the watchdog timer and set the time-out interval to 10 s
;-----------------------------------------------------------
Mov dx,2eh ; Unlock the NCT6106D Mov al,87h
Out dx,al Out dx,al
;-----------------------------------------------------------
Mov al,07h ; Select the registers of watchdog timer Out dx,al
Inc dx
Mov al,08h Out dx,al
;-----------------------------------------------------------
Dec dx ; Enable the function of watchdog timer Mov al,30h
Out dx,al Inc dx
Mov al,01h Out dx,al
;-----------------------------------------------------------
Dec dx ; Set seconds as the unit of time Mov al,0f0h
Out dx,al Inc dx
In al,dx
And al,not 08h Out dx,al
;-----------------------------------------------------------
Dec dx ; Set the time-out interval to 10 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 time-out interval to 5 min
;-----------------------------------------------------------
Mov dx,2eh ; Unlock NCT6106D Mov al,87h
Out dx,al Out dx,al
Mov al,07h ; Select the registers of watchdog timer Out dx,al
Inc dx
Mov al,08h Out dx,al
;-----------------------------------------------------------
Dec dx ; Enable the function of the watchdog timer Mov al,30h
Out dx,al Inc dx
Mov al,01h Out dx,al
;-----------------------------------------------------------
Dec dx ; Set minutes as the unit of time Mov al,0f0h
Out dx,al Inc dx
In al,dx Or al,08h Out dx,al
;-----------------------------------------------------------
Dec dx ; Set the time-out interval to 5 min and start counting Mov al,0f1h
Out dx,al Inc dx Mov al,5 Out dx,al
;-----------------------------------------------------------
Dec dx ; Lock the NCT6106D Mov al,0aah
65
VPS-3100 User Manual

Advertisement

Table of Contents
loading

Table of Contents