Real Time Devices AD1200 User Manual page 95

Table of Contents

Advertisement

iilef
82C54
Wrlte Operations
The programming procedure for the 82C54 is very
flexible. Only two conventions need to be remem-
bered:
1) For each Counter, the Control Word must be
written before the initial count is written.
2) The initial count must tollow the count format
specified in the Control Word (least significant
byte only, most significant byte only, or least sig-
nificant byte and then most significant byte).
Since the Control Word Register and the three
Counters have separate addresses (selected by the
Ar, Ao inputs), and each Gontrol Word specifies the
Counter it applies to (SC0, SC1 bits), no special in-
Read Operations
It is often desirable to read the value of a Gounter
without disturbing the count in progress. This is easi-
ly done in the 82C54.
There are three possible methods for reading the
counters: a simple read operation, the Counter
struction s€quence is required. Any programming
sequence that follows th€ conventions above is ac-
ceptable.
A new initial count may be written to a Counter at
any time without affecting the Counter's pro-
grammed Mode in any way. Counting will be atfected
as described in the Mode definitions. The new count
must follow the programmed count format.
lf a Gounter is programmed to read/write two-byte
counts, the following precaution applies: A program
must not transfer control between writing the first
and second byte to another routine which also writes
into that same Counter. Othenrise, the Counter will
be loaded with an incorrect count.
Latch Command, and the Read-Back Gommand.
Each is explained below. The first method is to per-
form a simple read operation. To read the Counter,
which is selected with the A1, A0 inputs, the CLK
input of the selecied Counter must be inhibited by
using either the GATE inpui or external logic. Other-
wise, the count may be in the process of changing
when it is read, giving an undefined result.
3-88
ControlWord - Counter 0
LSB of count -
Counter 0
MSBofcount- Gounter0
Control Word -
Counter 1
LSB of count -
Counter 1
MSB of count- Gounter 1
Control Word -
Counter 2
LSBofcount- Counter2
MSB of count -
Counter 2
Control Word -
Counter 0
Counter Word -
Counter 1
Control Word -
Counter 2
LSBofcount- Counter2
LSBofcount- Counterl
LSBofcount- Counter0
MSB of count -
Counter 0
MSB of count -
Counter 1
MSB of count -
Counter 2
NOTE:
Ao
1
1
1
0
0
1
1
0
0
A1
'l
1
1
1
41
Ae
1 1
0 0
0 0
1 1
0 1
0 1
1 1
1 0
1 0
A1
A6
1 1
1 1
0 1
1 1
0 0
0 1
1 0
0 0
1 0
A1
Ae
1 1
1 1
1 1
1 0
0 1
0 0
0 0
0 1
1 0
ControlWord -
Control Word -
ControlWord -
LSB of count -
MSB of count-
LSB of count -
MSB of count-
LSB of count -
MSB of count -
ControlWord -
ControlWord-
LSB of count -
ControlWord -
LSB of count -
MSB of count-
LSB of count-
MSB of count-
MSB of count -
Counter 2
Counter 1
Counter 0
Counter 2
Counter 2
Counter 1
Counter 1
Counter 0
Counter 0
Counter 1
Counter 0
Counter 1
Counter 2
Counter 0
Counter 1
Counter 2
Counter 0
Counter 2
1
0
0
0
0
ln all four examples, all counters are programmed to read/writ€ two-byt€ counts.
These are only four of many possible programming saguenc€s.
Figure 8. A Few Poeslble Programmlng Sequences

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ada1200

Table of Contents