
48
Software
Installation
|
after
reset.
Once
you
have
enabled
the
watchdog
timer,
your
program
must
trigger
the
watchdog
timer
every
time
before
it
times
out.
After
you
trigger
the
watchdog
timer,
it
will
be
set
to
non
‐
zero
value
to
watchdog
counter
and
start
to
count
down
again.
If
your
program
fails
to
trigger
the
watchdog
timer
before
time
‐
out,
it
will
generate
a
reset
pulse
to
reset
the
system.
The
factor
of
the
watchdog
timer
time
‐
out
constant
is
approximately
1
second.
The
period
for
the
watchdog
timer
time
‐
out
is
between
1
to
FF
timer
factors.
If
you
want
to
reset
your
system
when
watchdog
times
out,
the
following
table
listed
the
relation
of
timer
factors
between
time
‐
out
periods.
Watchdog
Timer
Enabled
To
Enabled
the
watchdog
timer,
you
have
to
output
a
byte
of
timer
factor
to
the
watchdog
register
whose
address
is
2Eh
and
data
port
is
2fH.
The
following
is
an
Assemble
program,
which
demonstrates
how
to
enable
the
watchdog
timer
and
set
the
time
‐
out
period
at
28
seconds.
;
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
;
Enter
the
extended
function
mode,
interruptible
double
‐
write
;
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
Mov
dx,
2eh
;
Enter
to
extended
function
mode
Mov
al,
87h
Out
dx,al
Out
dx,al
Mov
al,07h
Time
Factor
Time
‐
Out
Period
(Seconds)
Time
‐
Out
Period
(Minutes)
1
1 1
2
2
2
3
3
3
4
4
4
5
5
5
“
“
“
“
“
“
“
“
“
FF
FF
FF