English
Language : 

Z8FMC16100 Datasheet, PDF (116/402 Pages) Zilog, Inc. – Z8 Encore-R Motor Control Flash MCUs
Z8 Encore!® Motor Control Flash MCUs
Product Specification
94
d. If using the Timer Output alternate function, set the initial output level (High or
Low) using the TPOL bit.
e. Set the interrupt mode.
2. Write to the Timer High and Low Byte registers to set the starting count value.
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 1 Register to enable the timer and initiate counting.
The timer period is calculated by the following equation (Start Value is typically = 1):
(Reload Value – Start Value + 1) x Prescaler
One-Shot Mode Time-Out Period(s) =
System Clock Frequency (Hz)
Triggered One-Shot Mode
In TRIGGERED ONE-SHOT mode, the timer operates as follows:
1. The Timer idles until a trigger is received. The timer trigger is taken from the Timer
Input pin. The TPOL bit in the Timer Control 1 Register selects whether the trigger
occurs on the rising edge or the falling edge of the Timer Input signal.
2. Following the trigger event, the timer counts system clocks up to the 16-bit reload
value stored in the Timer Reload High and Low Byte registers.
3. Upon reaching the reload value, the timer outputs a pulse on the Timer Output pin,
generates an interrupt, and resets the count value in the Timer High and Low Byte reg-
isters to 0001h. The duration of the output pulse is a single system clock. The TPOL
bit also sets the polarity of the output pulse.
4. The timer idles until the next trigger event. Trigger events that occur while the timer is
responding to a previous trigger are ignored.
The steps for configuring Timer 0 in TRIGGERED ONE-SHOT mode and initiating oper-
ation are as follows:
1. Write to the Timer Control registers to:
a. Disable the timer.
b. Configure the timer for TRIGGERED ONE-SHOT mode.
General-Purpose Timer
PRELIMINARY
PS024604-1005