English
Language : 

Z8F1680SH020SG Datasheet, PDF (116/412 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F1680 Series
Product Specification
91
In CONTINUOUS Mode, the timer clock always provides the timer input. The timer
period is calculated using the following equation:
CONTINUOUS Mode Time-Out Period (s)
=
------R----e--l--o---a---d----V-----a--l--u---e---------P---r--e---s--c---a---l-e-------
Timer Clock Frequency (Hz)
If an initial starting value other than 0001H is loaded into the Timer High and Low Byte
registers, the ONE-SHOT Mode equation must be used to determine the first time-out
period.
9.2.3.4. COUNTER Mode
In COUNTER Mode, the timer counts input transitions from a GPIO port pin. The timer
input is taken from the GPIO port pin Timer Input alternate function. The TPOL bit in the
Timer Control 1 Register selects whether the count occurs on the rising edge or the falling
edge of the Timer Input signal. In COUNTER Mode, the prescaler is disabled.
Caution: The input frequency of the Timer Input signal must not exceed one-fourth the timer
clock frequency.
Upon 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 High to Low) at timer
reload.
Observe the following steps to configure a timer for COUNTER Mode and initiate the
count:
1. Write to the Timer Control 1 Register to:
– Disable the timer.
– Configure the timer for COUNTER Mode.
– Select either the rising edge or falling edge of the Timer Input 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 Control 2 Register to choose the timer clock source.
PS025015-1212
PRELIMINARY
Timers