Chapter 5
96
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
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
• Period of a signal pulse (the time between two occurrences of the same edge – rising edge
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 of a signal pulse (the number of periods per second). You can calculate the
frequency as follows:
−
Frequency = 48 MHz/Number of Counts
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
for an example of
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.
Summary of Contents for Data Translation DT9857
Page 1: ...DT9857 and DT9857E UM 25656 M User s Manual Title Page ...
Page 4: ......
Page 10: ...Contents 10 ...
Page 14: ...About this Manual 14 ...
Page 25: ...Part 1 Getting Started ...
Page 26: ......
Page 40: ...Chapter 2 40 ...
Page 64: ...Chapter 4 64 ...
Page 71: ...Part 2 Using Your Module ...
Page 72: ......
Page 126: ...Chapter 6 126 ...
Page 132: ...Chapter 7 132 ...
Page 140: ...Chapter 8 140 ...
Page 180: ...Appendix B 180 ...
Page 181: ...181 C Register Level Programming Writing to the EEPROM Register 182 ...
Page 184: ...Appendix C 184 ...
Page 192: ...Index ...