English
Language : 

MC68HC05P4A Datasheet, PDF (35/72 Pages) Advanced Analogic Technologies – Microcontrollers
Chapter 8
Timer
8.1 Introduction
The timer consists of a 16-bit, software-programmable 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 microseconds to many seconds.
Refer to Figure 8-1 for a timer block diagram.
INTERNAL BUS
HIGH LOW
BYTE BYTE
$16 OUTPUT
$17 COMPARE
REGISTER
INTERNAL
PROCESSOR
CLOCK
³³³
8-BIT
BUFFER
/4
HIGH
BYTE
LOW
BYTE
16-BIT FREE
RUNNING
COUNTER
$18
$19
COUNTER
ALTERNATE
REGISTER
$1A
$1B
HIGH
BYTE
LOW
BYTE
INPUT
CAPTURE
REGISTER
$14
$15
OUTPUT
COMPARE
CIRCUIT
OVERFLOW
DETECT
CIRCUIT
EDGE
DETECT
CIRCUIT
TIMER
STATUS ICF OCF TOF $13
REG.
DQ
CLK
OUTPUT
LEVEL
REG. C
TIMER RESET
ICIE
OCIE TOIE
IEDG
OLVL
CONTROL
REG.
$12
INTERRUPT
CIRCUIT
EDGE
OUTPUT INPUT
LEVEL (TCAP)
(TCMP)
Figure 8-1. Timer Block Diagram
Each specific functional segment (capability) is represented by two registers. These registers contain the
high and low byte of that functional segment. Generally, accessing the low byte of a specific timer function
allows full control of that function; however, an access of the high byte inhibits that specific timer function
until the low byte also is accessed.
MC68HC05P4A Data Sheet, Rev. 7.1
Freescale Semiconductor
35