English
Language : 

Z8E520 Datasheet, PDF (32/43 Pages) Zilog, Inc. – 1.5 MBPS USB Device Controller
Z8E520/C520
1.5 MBPS USB Device Controller
FUNCTIONAL DESCRIPTIONS (Continued)
condition. When the timer control register is written, all tim-
ers that are enabled by the write will begin counting using
the value that is held in their count register. An auto-initial-
ization is not performed. All timers can receive an internal
clock source only, so synchronization of timer updates is
not an issue. Each standard timer that is enabled will be
updated every 8th XTAL clock cycle.
If T0 and T1 are defined to work independently, then each
will work as an 8-bit timer with a single auto-initialization
register; T0ARLO for T0, and T1ARLO for T1. Each timer
will assert its predefined interrupt when it times out, and
will optionally perform the auto-initialization function. If T0
and T1 are cascaded to form a single 16-bit timer, then the
single 16-bit timer will be capable of performing as a Pulse-
Width Modulator (PWM). This timer is referred to as T01 to
distinguish it as having special functionality that is not
available when T0 and T1 act independently.
When T01 is enabled, it can use a pair of 16-bit auto-initial-
ization registers. In this mode, one 16-bit auto-initialization
value is composed of the concatenation of T1ARLO and
T0ARLO, and the second auto-initialization value is com-
posed of the concatenation of T1ARHI and T0ARHI. When
T01 times out, it will alternately initialize its count value us-
ing the Lo auto-init pair followed by the Hi auto-init pair.
This functionality corresponds to a PWM where the T1 in-
terrupt will define the end of the High section of the wave-
Zilog
form, and the T0 interrupt will mark the end of the Low por-
tion of the PWM waveform.
To use the cascaded timers as a PWM, one must initialize
the T0/T1 count registers to work in conjunction with the
port pin. The user should initialize the T0 and T1 count reg-
isters to the PWM hi auto-init value to obtain the required
PWM behavior. The PWM is arbitrarily defined to use the
Low auto-reload registers first, implying that it had just
timed out after beginning in the High portion of the PWM
waveform. As such, the PWM is defined to assert the T1
interrupt after the first timeout interval.
After the auto-initialization has been completed, decre-
menting occurs for the number of counts defined by the
auto-init_lo registers. When decrementing again reaches
0, the T0 interrupt is asserted; and auto-init using the auto-
init_hi registers occurs. Decrementing occurs for the num-
ber of counts defined by the auto-init_hi registers until
reaching 0, at which time the the T1 interrupt is asserted,
and the cycle begins again. The internal timers can be
used to trigger external events by toggling port output
when generating an interrupt. This functionality can only
be achieved in conjunction with the port unit defining the
appropriate pin as an output signal with the timer output
special function enabled. In this mode, the appropriate port
output will be toggled when the timer count reaches 0, and
will continue toggling each time that the timer times out.
XTAL ÷ 8
Register Data Bus
REG C0–0
T0ARHI
T0
IRQ0
T1ARHI LOAD
OUF
OUF
T
T1
PWM
PA1
REG C0–1
XTAL
÷8 T0ARLO
T1ARLO
LOAD
IRQ1
= Bidirectional
Figure 18. Z8E520 Timers Block Diagram
32
PRELIMINARY
DS97KEY2005