English
Language : 

Z8F1680SH020SG Datasheet, PDF (122/412 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F1680 Series
Product Specification
97
PWM 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)
PWM Output High Time Ratio (%) = R----e---l--o---a---d----V----a---l--u---e--------P----W-----M-------V-----a--l--u---e-  100
Reload Value
If TPOL is set to 1, the ratio of the PWM output High time to the total period is calculated
using the following equation:
PWM Output High Time Ratio (%)
=
--P---W------M-------V----a---l-u---e---
Reload Value
 100
9.2.3.8. CAPTURE Mode
In CAPTURE Mode, the current timer count value is recorded when the appropriate exter-
nal Timer Input transition occurs. The Capture count value is written to the Timer PWM0
High and Low Byte registers. The Timer counts timer clocks up to the 16-bit reload value.
The TPOL bit in the Timer Control 1 Register determines if the Capture occurs on a rising
edge or a falling edge of the Timer Input signal. When the Capture event occurs, an inter-
rupt is generated and the timer continues counting. The INPCAP bit in Timer Control 0
Register is set to indicate the timer interrupt is due to an input capture event.
The timer continues counting up to the 16-bit reload value stored in the Timer Reload
High and Low Byte registers. Upon reaching the reload value, the timer generates an
interrupt and continues counting. The INPCAP bit in Timer Control 0 Register is cleared
to indicate the timer interrupt is not due to an input capture event.
Observe the following steps to configure a timer for CAPTURE Mode and initiate the
count:
1. Write to the Timer Control 1 Register to:
– Disable the timer
– Configure the timer for CAPTURE Mode
– Set the prescale value
– Set the Capture edge (rising or falling) for the Timer Input
2. Write to the Timer Control 2 Register to choose the timer clock source.
3. Write to the Timer Control 0 Register to set the timer interrupt configuration field
TICONFIG.
PS025015-1212
PRELIMINARY
Timers