GENERAL RELEASE SPECIFICATION
April 30, 1998
MOTOROLA
9-6
16-BIT PROGRAMMABLE TIMER
For More Information On This Product,
Go to: www.freescale.com
MC68HC05PL4
REV 2.0
The result obtained by an input capture will be one count higher than the value of
the free-running timer counter preceding the external transition. This delay is
required for internal synchronization. Resolution is affected by the prescaler,
allowing the free-running timer counter to increment once every four internal clock
cycles (eight oscillator clock cycles).
Reading the ICRH inhibits further captures until the ICRL is also read. Reading
the ICRL after reading the timer status register (TSR) clears the ICF flag bit. does
not inhibit transfer of the free-running counter. There is no conflict between read-
ing the ICRL and transfers from the free-running timer counters. The input capture
registers always contain the free-running timer counter value which corresponds
to the most recent input capture.
NOTE
To prevent interrupts from occurring between readings of the ICRH and ICRL, set
the I bit in the condition code register (CCR) before reading ICRH and clear the I
bit after reading ICRL.
9.4
OUTPUT COMPARE REGISTERS
The Output Compare function is a means of generating an output signal when the
16-bit timer counter reaches a selected value as shown in
Figure 9-8
. Software
writes the selected value into the output compare registers. On every fourth inter-
nal clock cycle (every eight oscillator clock cycle) the output compare circuitry
compares the value of the free-running timer counter to the value written in the
output compare registers. When a match occurs, the timer transfers the output
level (OLVL) from the timer control register (TCR) to the TCMP.
Software can use the output compare register to measure time periods, to gener-
ate timing delays, or to generate a pulse of specific duration or a pulse train of
specific frequency and duty cycle on the TCMP.
BIT 7
ICRH7
BIT 6
ICRH6
BIT 5
ICRH5
BIT 4
ICRH4
BIT 3
ICRH3
BIT 2
ICRH2
BIT 1
ICRH1
BIT 0
ICRH0
ICRH
$0014
R
W
reset:
U
U
U
U
U
U
U
U
ICRL
$0015
R
W
ICRL7
ICRL6
ICRL5
ICRL4
ICRL3
ICRL2
ICRL1
ICRL0
reset:
U
U
U
U
U
U
U
U
U = UNAFFECTED BY RESET
Figure 9-7. Input Capture Registers (ICRH, ICRL)
F
Freescale Semiconductor, Inc.
n
.