English
Language : 

Z80 Datasheet, PDF (35/330 Pages) Zilog, Inc. – Z80 CPU PERIPHERALS
< %27 2GTKRJGTCNU
7UGT /CPWCN

used in applications where this output pulse is not required. Additionally, if
the channel is pre-programmed by bit 7 of the channel control word, an
interrupt request sequence is generated. For more details, see the CTC
Interrupt Servicing section
The zero-count condition also results in the automatic reload of the down-
counter with the original time constant data word in the Time Constant
register. There is no interruption in the sequence of continued down-
counting. If the Time Constant register is written with a new Time Constant
Data Word while the down-counter is decrementing, the present count is
completed before the new time constant is loaded into the down-counter.
CTC TIMER Mode
In CTC TIMER mode, the CTC generates timing intervals that are an
integer value of the system clock period. This mode is programmed for a
channel when its Channel Control Word is written with bit 6 reset. The
channel then may be used to measure intervals of time based on the System
clock period. The System clock is fed through the prescaler and the down-
counter. Depending on the pre programmed bit 5 in the Channel Control
Word, the prescaler divides the System clock by a factor of 16 or 256.
The output of the prescaler is then used as a clock to decrement the down-
counter, which may be pre programmed with any time constant integer
between 1 and 256. The time constant is automatically reloaded into the
down-counter at each zero-counter condition. At zero count, the channel’s
Time Cut (ZC/TO) output (which is the output of the down-counter) is
pulsed, resulting in a uniform pulse train of the precise period given by the
product as shown below.
8-
$
Where tc is the System clock, P is the prescaler factor of 16 or 256, and TC
is the pre-programmed time constant.
UM008101-0601
Counter/Timer Channels