English
Language : 

MC68HC05JJ6 Datasheet, PDF (162/216 Pages) Freescale Semiconductor, Inc – General Release Specification Microcontrollers
Programmable Timer
11.5 Input Capture Registers
The input capture function is a means to record the time at which an
event occurs. The source of the event can be the change on an external
pin (PB3/AN3/TCAP) or the CPF2 flag bit of voltage comparator 2 in the
analog subsystem. The ICEN bit in the analog subsystem control
register (ACR) at $001D selects which source is the input signal. When
the input capture circuitry detects an active edge on the selected source,
it latches the contents of the free-running timer counter registers into the
input capture registers as shown in Figure 11-6.
NOTE: Both the ICEN bit in the ACR and the IEDG bit in the TCR must be set
when using voltage comparator 2 to trigger the input capture function.
Latching values into the input capture registers at successive edges of
the same polarity measures the period of the selected input signal.
Latching the counter values at successive edges of opposite polarity
measures the pulse width of the signal.
PB3
AN3
TCAP
READ
ICRH
INPUT
SELECT
MUX
CPF2
FLAG
BIT
FROM
ANALOG
SUBSYSTEM
RESET
ICEN
CONTROL
BIT
EDGE
SELECT
& DETECT
LOGIC
LATCH
ICRH ($0014) ICRL ($0015)
16-BIT COUNTER
INPUT CAPTURE (ICF)
INTERNAL
DATA
BUS
READ
ICRL
÷4
INTERNAL
CLOCK
(OSC ÷ 2)
TIMER
INTERRUPT
REQUEST
TIMER CONTROL REG.
$0012
TIMER STATUS REG.
$0013
INTERNAL
DATA
BUS
Figure 11-6. Timer Input Capture Block Diagram
General Release Specification
162
MC68HC05JJ6/MC68HC05JP6 — Rev. 3.2
Programmable Timer
Freescale Semiconductor