Example Program - Advantech PCA-6742 User Manual

Half-size cpu card
Hide thumbs Also See for PCA-6742:
Table of Contents

Advertisement

Table B.1: Watchdog Timer Registers
Address of
register (2E)
87 (hex)
07 (hex)
30 (hex)
F5 (hex)
F6 (hex)
F7 (hex)
AA (hex)
B.1.2

Example Program

1.
Enable watchdog timer and set 10 sec. as timeout interval
;-----------------------------------------------------------
Mov dx,2eh
Mov al,87h
Out dx,al
Out dx,al
;-----------------------------------------------------------
Mov al,07h
Out
dx,al
Inc
dx
Mov
al,08h
Out
dx,al
;-----------------------------------------------------------
Dec dx
Mov
al,30h
Out
dx,al
Inc
dx
Mov
al,01h
Out
dx,al
;-----------------------------------------------------------
PCA-6742 User Manual
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Attribute
Value (2F) and Description
Read/Write
Write this address to I/O address port 2E (hex) twice to
-----
unlock the W83627HG
write
Write 08 (hex) to select register of watchdog timer.
Write 01 (hex) to enable the function of the watchdog timer.
write
Disabled is set as default.
Set seconds or minutes as units for the timer. Write 0 to bit 3:
write
set second as counting unit. [default]. Write 1 to bit 3: set
minutes as counting unit
0: stop timer [default]
01~FF (hex): The amount of the count, in seconds or min-
utes, depends on the value set in register F5 (hex). This
write
number decides how long the watchdog timer waits for
strobe before generating an interrupt or reset signal. Writing
a new value to this register can reset the timer to count with
the new value.
Bit 6: Write 1 to enable keyboard to reset the timer, 0 to dis-
able.[default]
Bit 5: Write 1 to generate a timeout signal immediately and
read/write
automatically return to 0. [default=0]
Bit 4: Read status of watchdog timer, 1 means timer is "time-
out".
Write this address to I/O port 2E (hex) to lock the watchdog
-----
timer 2.
; Unlock W83627HG
; Select registers of watchdog timer
; Enable the function of watchdog timer
34

Advertisement

Table of Contents
loading

This manual is also suitable for:

Eva-x4300

Table of Contents