Real Time Devices AD1200 User Manual page 97

Table of Contents

Advertisement

inbf
82C54
count, all but the first are ignored; i.e., the count
which will be read is the count at the time the first
read-back command was issued.
The read-back command may also be used to latch
status information of selected counter(s) by setting
ffifre
bit D4:0. Status must be tatch6d to ue
read; status of a counter is accessed by a read from
that counter.
The counter status tormat is shown in Figure 11. Bits
D5 through D0 contain the counter's programmed
Mode exactly as written in the last Mode Control
Word. OUTPUT bit D7 contains the cunent state of
the OUT pin. This allows the user to monitor the
counter's output via software, possibly eliminating
some hardware from a system.
Flgure 11. Status Byte
NULL COUNT bit DO indicates when the last count
written to the counter register (CR) has been loaded
into the counting element (CE). The exact time this
happens depends on the Mode of the counter and is
described in the Mode Definitions, but untilthe count
is loaded into the counting element (CE), it can't be
read from the counter. lf the count is latched or read
before this time, the count value will not reflect the
new count just written. The operation of Null Count
is shown in Figure 12.
THIS ACTION:
CAUSES:
A. Write to the control
word register:ht
Null count= 1
B. Write to the count
r"tot"i tcnitri
Nullcount:1
C. New count is loacled
into cE (cH + 6E;.
Null count=o
ttl Qn! the counter specilied by the control word will
have its null count set to 1. Null count bits of other
counters are unatfected.
l2l f tne counler is programmed for two-byte counts
(least significant byte thgn most significant byte) null
count goes to 1 when the second byte is written.
Flgure 12. NullCount Opera$on
lf multiple status latch operations of the counter(s)
are performed without reading the status, all but the
first are ignored; i.e., the status that will be read is
the status of the counter at the time the first status
read-back command was issued.
Both count and status of the selected counter(s)
may be latched simultaneously by setting both
ffi
and SIAluS- bits DS,D4:0. rnis ii func-
tionally the same as issuing two separate read-back
commands at once, and the above discussions ap-
ply here also. Specifically, if multipl€ count and/or
status read-back commands are issued to the same
counter(s) without any intervening reads, all but the
first are ignored. This is illustrated in Figure 13.
lf both count and status of a counter are latched, the
first read operation of that counter will return latched
status, regardless of which was latched first. The
next one or two reads (depending on whether the
counter is programmed for one or two type counts)
return latched count. Subsequent reads return un-
latched count.
Dl
OUTPUT
NULL
COUNT
RWI RWOM2 M1 MO BCD
D z 1 : O u t P i n i s l
0 :
O u t P i n i s 0
D 5 1 :
N u l l c o u n t
0 : Count available for reading
Ds-Do Counter Programmed Mode (See Figure 7)
Command
D7 D5 D5 Da D3 D2 D1 D9
DescrlPtlon
Results
1
1
0
0
0
0
1
0 Read back count and status of
Counter 0
Count and status latched
for Counter 0
1
1
1
0
0
1
0
0
Read back status of Counter 1
Status latched for Counter 1
1
1
1
0
1
1
0
0 Read back status of Counters 2, 1 status latched for counter
2, but not Counter 1
1
1
0
1
1
0
0
0
Read back count of Counter 2
Count latched for Counter 2
1
1
0
0
0
1
0
0 Read back count and status of
Counter 1
Count latched lor Counter 1
but not status
1
1
1
0
0
0
1
0
Read back status of Counter 1
Command ignored, status
already latched for Counter 1
Figure 13. Read-Back Gommand Example
3-90

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ada1200

Table of Contents