English
Language : 

Z8F0113HJ005EG Datasheet, PDF (89/245 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F0823 Series
Product Specification
74
Caution: The frequency of the comparator output signal must not exceed one-fourth the system
clock frequency.
After reaching the reload value stored in the Timer Reload High and Low Byte registers,
the timer generates an interrupt, the count value in the Timer High and Low Byte registers
is reset to 0001H and counting resumes. Also, if the Timer Output alternate function is
enabled, the Timer Output pin changes state (from Low to High or from High to Low) at
timer reload.
Observe the following steps to configure a timer for COMPARATOR COUNTER Mode
and initiating the count:
1. Write to the Timer Control Register to:
– Disable the timer.
– Configure the timer for COMPARATOR COUNTER Mode.
– Select either the rising edge or falling edge of the comparator output signal for the
count. This also sets the initial logic level (High or Low) for the Timer Output
alternate function. However, the Timer Output function is not required to be
enabled.
2. Write to the Timer High and Low Byte registers to set the starting count value. This
action only affects the first pass in COMPARATOR COUNTER Mode. After the first
timer reload in COMPARATOR COUNTER Mode, counting always begins at the
reset value of 0001H. Generally, in COMPARATOR COUNTER Mode the Timer
High and Low Byte registers must be written with the value 0001H.
3. Write to the Timer Reload High and Low Byte registers to set the reload value.
4. If appropriate, enable the timer interrupt and set the timer interrupt priority by writing
to the relevant interrupt registers.
5. If using the Timer Output function, configure the associated GPIO port pin for the
Timer Output alternate function.
6. Write to the Timer Control Register to enable the timer.
In COMPARATOR COUNTER Mode, the number of comparator output transitions since
the timer start is computed via the following equation:
Comparator Output Transitions = Current Count Value – Start Value
PS024315-1011
PRELIMINARY
Operation