Author :
Craig
Steiner
Source :
8052.com
Book :
The
8051/8052
Microcontroller:
Architecture,
Assembly
Language,
And
Hardware
Interfacing
(Paperback)
Detecting
Timer
Overflow
Often it
is
necessary
to just
know
that the
timer
has
reset to
0. That
is to
say, you
are not
particularly
interest
in the
value of
the
timer
but
rather
you are
interested
in
knowing
when the
timer
has
overflowed
back to
0.
Whenever
a timer
overflows
from
it’s
highest
value
back to
0, the
microcontroller
automatically
sets the
TFx bit
in the
TCON
register.
This is
useful
since
rather
than
checking
the
exact
value of
the
timer
you can
just
check if
the TFx
bit is
set. If
TF0 is
set it
means
that
timer 0
has
overflowed;
if TF1
is set
it means
that
timer 1
has
overflowed.
>>>
Enter
here for
detail
on
"Detecting
a Timer
Overflow"<<<
<<< Click
here to
come
back on
(8051
-
Timers)