English
Language : 

Z86D990 Datasheet, PDF (46/102 Pages) Zilog, Inc. – Low-Voltage Micro controllers with ADC
Z86D990/Z86D991 OTP and Z86L99X ROM
Low-Voltage Microcontrollers with ADC
39
R243 PRE1
Prescaler 1 Register
(F3h; Read/Write)
D0
Figure 24. Counting Modes
Count mode
1 = T1 modulo-N
0 = T1 single pass
When the PRE1 register is loaded with 000000 in the six most significant bits, the
prescaler divides by 64. If that number is 000001, the prescaler does not divide
and passes its clock on to T1.
Each time the prescaler reaches its end-of-count, a carry is generated, which
allows the counter/timer to decrement by one on the next timer clock input. When
T1 and PRE1 both reach their end-of-count, an interrupt request is generated—
IRQ5 for T1. Depending on the counting mode selected, the counter/timer either
comes to rest with its value at 00h (single-pass mode), or the initial value is auto-
matically reloaded and counting continues (continuous mode). In single-pass
mode, the prescaler still continues to decrement when the timer T1 has reached
its end-of-count. The prescaler always starts from its programmed value upon
restarting the counter.
The counting modes are controlled by bit D0 of PRE1, with D0 cleared to 0 for sin-
gle-pass counting mode or set to 1 for continuous mode.
The counter/timer can be stopped at any time by setting the Enable Count bit to 0
and restarted by setting the Enable Count bit back to 1. The T1 counter/timer con-
tinues its count value at the time it was stopped. The current value in the T1
counter/timer can be read at any time without affecting the counting operation.
New initial values can be written to the prescaler or the counter/timer registers at
any time. These values are transferred to their respective down-counters on the
next load operation. If the counter/timer mode is continuous, the next load occurs
on the timer clock following an end-of-count. New initial values must be written
before the load operation because the prescaler always effectively operates in
continuous count mode.
If the value loaded in the T1 register is 01h, the timer is actually not timing or
counting at all; the timer is passing the prescaler end-of-count through. Because
the prescaler is continuously running, regardless of the single-pass/continuous
mode operation, the 8-bit timer continuously times out at the rate of the prescaler
end-of-count if the T1 timer value is programmed to 01h.
PS003807-1002
PRELIMINARY