Counter/Timers (8254)
If a counter is latched and then some time later latched again before
the count is read, the second Counter Latch command is ignored. The
count read will be the count at the time the first Counter Latch
command was issued.
Like the first method of reading the counter, the Counter Latch
command requires that the count be read according to the
programmed format. If the counter is programmed for two byte
counts, two bytes must be read (though not necessarily one right after
the other).
Another feature of the 8254 is that reads and writes of the same
counter may be interleaved; for example, if the counter is pro-
grammed for two byte counts, the following sequence is valid:
1.
Read least significant byte
2.
Write new least significant byte
3.
Read most significant byte
4.
Write new most significant byte
If a counter is programmed to read or write two-byte counts, the
following precaution applies: a program must not transfer control
between reading the first and second byte to another routine that also
reads from that same counter. If this happens, an incorrect count will
be read.
11-10