L
G
R
16-Bit Timers
General Release Specification
MC68HC(7)05H12
—
Rev. 1.0
108
16-Bit Timers
MOTOROLA
The output compare register values and the output level bit should be
changed after each successful comparison to establish a new elapsed
time-out. An interrupt can also accompany a successful output compare
provided the corresponding interrupt enable bit (OCI2E) is set.
After a processor write cycle to the output compare register 2 containing
the MSB ($26), the output compare function is inhibited until the LSB
($27) is also written. The user must write both bytes (locations) if the
MSB is written first. A write made only to the LSB ($27) will not inhibit the
compare function. The free-running counter is updated every four
internal bus clock cycles. The minimum time required to update the
output compare register is a function of the program rather than the
internal hardware.
The processor can write to either byte of the output compare register 2
without affecting the other byte. The output level (OLVL2) bit is clocked
to the output level register regardless of whether the output compare flag
(OC2F) is set or clear.
Because the output compare flag OC2F and the output compare register
2 are undetermined at power-on, and are not affected by external reset
care must be exercised when initializing the output compare function. A
procedure as recommended for compare register 1 should be followed.
9.3.5 Input Capture Registers
There are two identical input capture registers: input capture register 1
and input capture register 2. The two following sections describe these
two registers.
9.3.6 Input Capture Register 1
Two 8-bit registers, which make up the 16-bit input capture register 1,
are read-only and are used to latch the value of the free-running counter
after the corresponding input capture edge detector senses a defined
transition on the TCAP1 pin. The level transition which triggers the
counter transfer is defined by the corresponding input edge bit (IEDG1).
Reset does not affect the contents of the input capture register.