ICOP Embedded 386SX PC/104 AIO CPU Module User's Manual
25
nop
Lock configuration register
W a t c h d o g P r o g r a m E x a m p l e
W e u s e t h e f o l l o w i n g s e q u e n c e t o i n i t i a l i z e t h e w a t c h d o g t i m e r :
( 1 ) U n l o c k c o n f i g u r a t i o n r e g i s t e r .
( 2 ) D i s a b l e w a t c h d o g t i m e r b y s e t t i n g I N D E X 3 7 H B i t 6 t o ‘ 0’.
(3) Set the expected counter value to INDEX 3BH, 3AH, 39H.
( 4 ) S e l e c t t i m e o u t a c t i o n f r o m I N D E X 3 8 H B i t 7 -4 .
( 5 ) E n a b l e w a t c h d o g t i m e r b y s e t t i n g I N D E X 3 7 H B i t 6 t o ‘ 1 ’ .
( 6 ) L o c k c o n f i g u r a t i o n r e g i s t e r .
E x a m p l e : S e t t i m e o u t t o 1 2 8 s e c t o g e n e r a t e a s y s tem RESET.
; Please use MASM to compiler the following program
; Execute under DOS environment
dosseg
. model small
. stack 100h
.code
main proc
mov ax, 0c513h ; Unlock config. register
call writechip
mov ax, 03737h ; Disable watchdog timer
call readchip
and al, 10111111b
xchg ah, al
call writechip
mov ax, 0403bh ; Set the expected counter
; value
call writechip ; to [400000h]
mov ax, 0003ah ; 30.5*sec*400000h= 128 sec
Содержание ICOP-6050
Страница 4: ...iv...