Chapter 5
Edge-to-Edge Measurement
Use edge-to-edge measurement mode if you want to measure the time interval between a
specified start edge and a specified stop edge.
The start edge and the stop edge can occur on the rising edge of the counter's gate input, the
falling edge of the counter's gate input, the rising edge of the counter's clock input, or the
falling edge of the counter's clock input. When the start edge is detected, the counter/timer
starts incrementing, and continues incrementing until the stop edge is detected. The C/T then
stops incrementing until it is enabled to start another measurement. When the operation is
complete, you can read the value of the counter.
You can use edge-to-edge measurement to measure the following:
• Pulse width of a signal pulse (the amount of time that a signal pulse is in a high or a low
• Period of a signal pulse (the time between two occurrences of the same edge – rising edge
• Frequency of a signal pulse (the number of periods per second). You can calculate the
Using software, specify the counter/timer mode as edge-to-edge measurement mode
(measure), the C/T clock source as internal, the start edge type, and the stop edge type.
Make sure that the signals are wired appropriately. Refer to
connecting an edge-to-edge measurement application.
Continuous Edge-to-Edge Measurement
In continuous edge-to-edge measurement mode, the counter starts incrementing when it
detects the specified start edge. When it detects the next start edge type, the value of the
counter is stored and the next edge-to-edge measurement operation begins automatically.
Every time an edge-to-edge measurement operation completes, the previous measurement is
overwritten with the new value. When you read the counter as part of the analog input data
stream, the current value (from the last edge-to-edge measurement operation) is returned and
the value of the counter is reset to 0. Refer to the previous section for more information on
edge-to-edge measurement mode.
Note: If you read the counter before the measurement is complete, 0 is returned.
96
state, or the amount of time between a rising edge and a falling edge or between a falling
edge and a rising edge). You can calculate the pulse width as follows:
− Pulse width = Number of counts/48 MHz
to rising edge or falling edge to falling edge). You can calculate the period as follows:
− Period = 1/Frequency
− Period = Number of counts/48 MHz
frequency as follows:
− Frequency = 48 MHz/Number of Counts
page 56
for an example of
Need help?
Do you have a question about the Data Translation DT9857 and is the answer not in the manual?
Questions and answers