ZiLOG
0C0
TCTLLO
D7 D6
D5 D4 D3 D2
D1 D0
Z8E001
Z8Plus OTP Microcontroller
TIMER STATUS
D2 D1 D0 T0
T1
T01
---- ---- --- ------------ ------------ ---------------
0 0 0 DISAB. DISAB.
0 0 1 ENAB. DISAB.
0 1 0 DISAB. ENAB.
0 1 1 ENAB. ENAB.
1 00
ENAB.(*)
1 0 1 ENAB.(*) DISAB.
1 1 0 DISAB. ENAB.(*)
1 1 1 ENAB.(*) ENAB.(*)
(NOTE: (*) INDICATES AUTO-RELOAD
IS ACTIVE.)
RESERVED (MUST BE 0)
1 = T23 16-BIT TIMER ENABLED WITH
AUTO-RELOAD ACTIVE
0 = T2 AND T3 TIMERS DISABLED
RESERVED (MUST BE 0)
Note: Timer T01 is a 16-bit PWM Timer formed by cascading 8-bit timers
T1 (MSB) and T0 (LSB). T23 is a standard 16-bit timer formed
by cascading 8-bit timers T3 (MSB) and T2 (LSB).
Figure 22. TCTLLO Register
Each 8-bit timer is provided a pair of registers, which are
both readable and writable. One of the registers is defined
to contain the auto-initialization value for the timer, while
the second register contains the current value for the timer.
When a timer is enabled, the timer decrements whatever
value is currently held in its count register, and then con-
tinues decrementing until it reaches 0. At this time, an in-
terrupt is generated and the contents of the auto-initializa-
tion register optionally copy into the count value register.
If auto-initialization is not enabled, the timer stops counting
upon reaching 0, and control logic clears the appropriate
control register bit to disable the timer. This operation is re-
ferred to as Òsingle-shotÓ. If auto-initialization is enabled,
the timer continues counting from the initialization value.
Software should not attempt to use registers that are defined
as having timer functionality.
Software is allowed to write to any register at any time, but
care should be taken if timer registers are updated while the
timer is enabled. If software updates the count value while
the timer is in operation, the timer continues counting based
upon the software-updated value.
Note: Strange behavior can result if the software update oc-
curred at exactly the point that the timer was reaching 0
to trigger an interrupt and/or reload.
Similarly, if software updates the initialization value reg-
ister while the timer is active, the next time that the timer
reaches 0, it initializes using the updated value.
Note: Strange behavior could result if the initialization value
register is being written while the timer is in the process
of being initialized.
Whether initialization is done with the new or old value is
a function of the exact timing of the write operation. In all
cases, the Z8E001 prioritizes the software write above that
of a decrementer writeback; however, when hardware
clears a control register bit for a timer that is configured for
single-shot operation, the clearing of the control bit over-
rides a software write. Reading either register can be done
DS001101-Z8X0400
PRELIMINARY
27