English
Language : 

MC68HC05JJ6 Datasheet, PDF (164/216 Pages) Freescale Semiconductor, Inc – General Release Specification Microcontrollers
Programmable Timer
11.6 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 11-8. Software writes the selected value into the output compare
registers. On every fourth internal clock cycle (every eight oscillator
clock cycles), 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 PB4/AN4/TCMP pin.
Software can use the output compare register to measure time periods,
to generate timing delays, or to generate a pulse of specific duration or
a pulse train of specific frequency and duty cycle on the PB4/AN4/TCMP
pin.
R/W
OCRH
($FFFC)
OCRH ($0016)
OCRL ($0017)
16-BIT COMPARATOR
16-BIT COUNTER
OUTPUT COMPARE
(OCF)
R/W
OCRL
EDGE
SELECT
DETECT
LOGIC
PB4
AN4
TCMP
INTERNAL
÷4
CLOCK
(OSC ÷ 2)
TIMER
INTERRUPT
REQUEST
RESET
TIMER CONTROL REG.
$0012
TIMER STATUS REG.
$0013
Figure 11-8. Timer Output Compare Block Diagram
INTERNAL
DATA
BUS
General Release Specification
164
MC68HC05JJ6/MC68HC05JP6 — Rev. 3.2
Programmable Timer
Freescale Semiconductor