English
Language : 

Z8F042ASJ020EG2156 Datasheet, PDF (100/280 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F082A Series
Product Specification
84
In Capture/Compare Mode, the elapsed time from timer start to Capture event can be cal-
culated using the following equation:
Capture
Elapsed
Time
(s)
=
---C-----a---p----t--u----r--e------V----a----l-u----e-----–-----S----t--a----r--t----V----a----l-u----e------------P-----r--e----s---c---a----l--e--
System Clock Frequency (Hz)
Reading the Timer Count Values
The current count value in the timers can be read while counting (enabled). This capability
has no effect on timer operation. When the timer is enabled and the Timer High Byte Reg-
ister is read, the contents of the Timer Low Byte Register are placed in a holding register.
A subsequent read from the Timer Low Byte Register returns the value in the holding reg-
ister. This operation allows accurate reads of the full 16-bit timer count value while
enabled. When the timers are not enabled, a read from the Timer Low Byte Register
returns the actual value in the counter.
Timer Pin Signal Operation
The timer output function is a GPIO port pin alternate function. The timer output is tog-
gled every time the counter is reloaded.
The timer input can be used as a selectable counting source. It shares the same pin as the
complementary timer output (TxOUT). When selected by the GPIO Alternate Function
registers, this pin functions as a timer input in all modes except for Dual PWM Output
Mode. For this mode, there is no timer input available. For the 8-pin device, the T0OUT
function is available for the various timer out functions. The T1OUT function is only
available in Dual PWM Output Mode.
Timer Control Register Definitions
This section defines the features of the following Timer Control registers.
Timer 0–1 Control Registers: see page 84
Timer 0–1 High and Low Byte Registers: see page 88
Timer Reload High and Low Byte Registers: see page 90
Timer 0–1 PWM High and Low Byte Registers: see page 91
Timer 0–1 Control Registers
The Timer Control registers are 8-bit read/write registers that control the operation of their
associated counter/timers.
PS022828-0413
PRELIMINARY
Timer Control Register Definitions