Intel MCS48 User Manual page 305

Family of single chip microcomputers
Hide thumbs Also See for MCS48:
Table of Contents

Advertisement

8253/8253-5
8253
READ/WRITE
PROCEDURE
Write
Operations
The
systems
software
must program each
counter
of
the
8253
with the
mode
and
quantity desired.
The
program-
mer
must
write
out
to
the
8253
a
MODE
control
word and
the
programmed number
of
count
register
bytes
(1
or
2)
prior to
actually
using the selected counter.
The
actual
order
of
the
programming
is
quite
flexible.
Writing out
of
the
MODE
control
word
can be
in
any
sequence
of
counter
selection,
e.g.,
counter #0 does
not
have
to
be
first
or
counter #2
last.
Each
counter's
MODE
control
word
register
has
a
separate address so
that
its
loading
is
completely
sequence
independent. (SCO,
SC1)
The
loading
of
the
Count
Register with the actual
count
value,
however,
must be done
in
exactly the
sequence
programmed
in
the
MODE
control
word
(RLO, RL1).
This
loading
of
the counter's
count
register
is
still
sequence
independent
like
the
MODE
control
word
loading, but
when
a selected
count
register
is
to
be loaded
it
must be
loaded
with the
number
of
bytes
programmed
in
the
MODE
control
word
(RLO, RL1).
The one
or
two
bytes
to
be loaded
in
the
count
register
do
not
have
to
follow the
associated
MODE
control
word.
They
can be
programmed
at
any
time
following the
MODE
control
word
loading as
long as the correct
number
of
bytes
is
loaded
in
order.
All
counters
are
down
counters.
Thus,
the value
loaded
into
the
count
register
will
actually
be decremented.
Loading
all
zeroes
into
a
count
register
wiH
result
in
the
maximum
count
(2
16
for
Binary
or
10
4
for
BCD).
In
MODE
the
new
count
will
not
restart
until
the load
has
been
completed.
It
will
accept
one
of
two
bytes
depending on
how
the
MODE
control
words
(RLO,
RL1)
are
program-
med.
Then
proceed
with the
restart
operation.
MODE
Control
Word
Counter
n
LSB
Count
Register
byte
Counter
n
MSB
Count
Register
byte
Counter
n
Note:
Format shown
is
a
simple
example
of loading
the
8253
and
does not imply
that
it is
the only
format
that
can be
used.
Figure
6.
Programming Format
No.
1
No. 2
No. 3
No.
4
No. 5
No.
6
No. 7
No.
8
No.
9
A1
A0
MODE
Control
Word
Counter
1
MODE
Control
Word
Counter
1
1
MODE
Control
Word
Counter 2
1
Count
Register
Byte
Counter
1
Count
Register
Byte
MSB
Counter
1
Count
Register
Byte
LSB
_
_
Counter
2
1
.,__
Count
Register
Byte
MSB
_
a
.
y
Counter
2.
1
Count
Register
Byte
Counter
..„„
Count
Register
Byte
MSB
_
Counter
Note:
The
exclusive addresses of
each
counter's
count
register
make
the
task of
programming
the
8253
a
very simple matter,
and
maximum
effective
use
of
the device
will
result
if
this
feature
is
fully utilized.
Figure
7.
Alternate
Programming Formats
8-15
00745A

Advertisement

Table of Contents
loading

Table of Contents