APPENDIX D
PCI-1711/1731 User’s Manual
Advantech Co., Ltd.
www.advantech.com
– 56 –
The read-back command can also latch status information for selected
counter(s) by setting STA bit = 0. The status must be latched to be
read; the status of a counter is accessed by a read from that counter.
The counter status format appears at the beginning of the chapter.
Counter Latch Operation
Users often want to read the value of a counter without disturbing the
count in progress. You do this by latching the count value for the
specific counter then reading the value.
The 82C54 supports the counter latch operation in two ways. The first
way is to set bits RW1 and RW0 to 0. This latches the count of the
selected counter in a 16-bit hold register. The second way is to perform
a latch operation under the read-back command. Set bits SC1 and SC0
to 1 and CNT = 0. The second method has the advantage of operating
several counters at the same time. A subsequent read operation on the
selected counter will retrieve the latched value.