MC68HC(7)05H12
—
Rev. 1.0
General Release Specification
MOTOROLA
16-Bit Timers
103
L
G
R
General Release Specification — MC68HC(7)05H12
Section 9. 16-Bit Timers
9.1 Contents
9.2
9.3
9.3.1
9.3.2
9.3.3
9.3.4
9.3.5
9.3.6
9.3.7
9.3.8
9.3.9
9.3.10
9.4
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
Output Compare Registers . . . . . . . . . . . . . . . . . . . . . . . .106
Output Compare Register 1 . . . . . . . . . . . . . . . . . . . . . . .106
Output Compare Register 2 . . . . . . . . . . . . . . . . . . . . . . .107
Input Capture Registers . . . . . . . . . . . . . . . . . . . . . . . . . .108
Input Capture Register 1. . . . . . . . . . . . . . . . . . . . . . . . . .108
Input Capture Register 2. . . . . . . . . . . . . . . . . . . . . . . . . .109
Timer Control Register 1. . . . . . . . . . . . . . . . . . . . . . . . . .110
Timer Control Register 2. . . . . . . . . . . . . . . . . . . . . . . . . .112
Timer Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Timer During WAIT Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . .114
9.2 Introduction
The MC68HC(7)05H12 has two 16-bit timers (Timer1 and Timer2) each
with two channels. The output compare function in Timer2 has no
external outputs, so it is used for generating precision time intervals and
interrupts only. Write access to the corresponding output level register
bits OLVL3 and OLVL4 has no effect. Apart from this difference in the
external connections, the internal operation of both is identical (each
timer having its own set of registers, see
Section 2.3 Registers
),
therefore only a complete description of Timer1 is given.
The timer consists of a 16-bit, free running counter driven by a fixed
divide-by-four prescaler. This timer can be used for many purposes,
including input waveform measurements while simultaneously
generating an output waveform. Pulse widths can vary from several