MC68F375
CONFIGURABLE TIMER MODULE (CTM9)
MOTOROLA
REFERENCE MANUAL
Rev. 25 June 03
13-56
software also selects one of two time-base buses, each originating at a counter sub-
module. The software can also enable an interrupt to occur when the input edge is
detected to notify the software that new edge capture information is available.
Figure 13-15 shows an example of an MCSM a counter submodule for an SASM con-
figured for input capturing. To measure the period of an incoming signal, the software
reads and saves the latched value in register A for one edge, then when the next edge
arrives, the software subtracts the new captured value in register A from the previously
saved value to obtain the period interval. The maximum period that can be measured
is the worst case software response time to a newly captured value.
The software measures the width of a pulse in a very similar way, the only difference
is that after each edge, the edge detector is reprogrammed to trigger on the next oppo-
site edge.
Figure 13-15 CTM9 Example — Single Edge Input Capture
13.11.2 CTM9 Input Double Edge Pulse Width Measurement
To measure the width of an input pulse, the CTM9 double-action submodule (DASM)
has two capture registers so that only one interrupt is needed after the second edge.
The software can read both edge samples and subtract them to get the pulse width.
The leading edge sample is double latched so that the software has the time of one
full period of the input signal to read the samples to be sure that nothing is lost.
Depending on the prescaler divide ratio, pulses width from 0.119 microseconds to 3
16-Bit Up Counter
Two
Submodule Bus
Edge
Detect
Input
Pin
16-Bit Register A
Input
Capture
Single Action Submodule Channel
Modulus Counter Submodule
Interrupt
Bus
From
Prescaler
or Pin
16-Bit
Time-
Modulus Register
Modulus
Control
Clock
Select
Load
Base
Buses
Select
Bus
Select
Overflow
Free-Running or
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.