Specifications

Counter/Timers
Programming
The TCU is enabled and mapped into an I/O address range using the
V40 configuration register. The TCU includes three counter/timers
and four programmable registers. The first register to be programmed
is the Mode register. This register selects one of the three
counter/timers and information needed for initialization. The next
register to be programmed is the Count register for the counter/timer
being used. When programming the Count register, it is important to
always write the number of bytes specified in the Read/Write Mode
bits of the Mode register.
The Count Latch and Multiple Count Latch commands are
recommended for reading count data from the Status register. When
reading the count, the number of bytes read must be consistent with
the Read/Write Mode bits programmed to the counter/timer. The low
byte is transferred on the first read operation of a two-byte read. The
Multiple Latch command must be used to read the status. If the count
and status are latched with the Multiple Latch command, add one to
the number of reads defined by the Read/Write Mode for the status.
As an example, if the Read/Write Mode specifies two bytes, three
read operations are required: one for the status, one for the low byte
of the count, and one for the high byte of the count, respectively.
7-28