English
Language : 

MC68HC05X4 Datasheet, PDF (109/156 Pages) Motorola, Inc – HCMOS Microcontroller Unit
Freescale Semiconductor, Inc.
16-Bit Programmable Timer
General Description
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Port configuration register (PCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Counter registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Timer functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Timer control register (TCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Timer status register (TSR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Input capture function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Input capture registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Output compare function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Output compare registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Timer during WAIT mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Timer during STOP mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Timer state diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Introduction
Besides the core timer the MC68HC05X4 has a 16-bit programmable
timer. This timer consists of a 16-bit read-only free-running counter, with
a fixed divide-by-four prescaler, plus the input capture/output compare
circuitry. Selected input edges cause the current counter value to be
latched into a 16-bit input capture register so that software can later read
this value to determine when the edge occurred. When the free running
counter value matches the value in the output compare registers, the
programmed pin action takes place. Refer to Figure 1 for a block
diagram of the timer. The timer must be enabled by setting the TIMEN
bit in the port configuration register (PCR).
1-ptimer
MOTOROLA
16-Bit Programmable Timer
For More Information On This Product,
Go to: www.freescale.com
MC68HC05X4 Rev 1.0
109