Advantech PCA-6187 user manual A.1.4 Example Program, Table A.1 Watchdog timer registers

Models: PCA-6187

1 126
Download 126 pages 48.89 Kb
Page 105
Image 105

F7 (hex)

read/write

Bit 6: Write 1 to enable key-

 

 

board to reset the timer, 0

 

 

to disable.[default]

 

 

Bit 5: Write 1 to generate a

 

 

timeout signal immediately

 

 

and automatically return to

 

 

0. [default=0]

 

 

Bit 4: Read status of watch-

 

 

dog timer, 1 means timer is

 

 

""time out""."

 

 

 

AA (hex)

-----

Write this address to I/O

 

 

port 2E (hex) to lock the

 

 

watchdog timer.2

 

 

 

Table A.1: Watchdog timer registers

A.1.4 Example Program

1.Enable watchdog timer and set 10 sec. as timeout interval ;-----------------------------------------------------------

Mov dx,2eh

; Unlock W83627HF

Mov al,87h

 

Out dx,al

 

Out dx,al

 

;-----------------------------------------------------------

 

Mov al,07h

; Select 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

 

93

AppendixA

Page 105
Image 105
Advantech PCA-6187 user manual A.1.4 Example Program, Table A.1 Watchdog timer registers