Author :
Craig
Steiner
Source :
8052.com
Book :
The
8051/8052
Microcontroller:
Architecture,
Assembly
Language,
And
Hardware
Interfacing
(Paperback)
How does
a timer
count?
How does
a timer
count?
The
answer
to this
question
is very
simple:
A timer
always
counts
up. It
doesn’t
matter
whether
the
timer is
being
used as
a timer,
a
counter,
or a
baud
rate
generator:
A timer
is
always
incremented
by the
microcontroller.
Programming
Tip:
Some
derivative
chips
actually
allow
the
program
to
configure
whether
the
timers
count up
or down.
However,
since
this
option
only
exists
on some
derivatives
it is
beyond
the
scope of
this
tutorial
which is
aimed at
the
standard
8051. It
is only
mentioned
here in
the
event
that you
absolutely
need a
timer to
count
backwards,
you will
know
that you
may be
able to
find an
8051-compatible
microcontroller
that
does it.
<<< Click
here to
come
back on
(8051
-
Timers)