5 pulse width measurement – ADLINK cPCI-8554/R User Manual
Page 44

34 • Signal Connection and Applications
4.5
Pulse Width Measurement
Step 1:
Use a fixed clock source as base time interval (or
base frequency).
Step 2:
Assuming an internal 2MHz clock is used. The time
base is:
∆
t = 1/2M=5x10e-7 sec
The count range for measuring the pulse width is:
∆
t < pulse width <
∆
t *65535 (=32.768 msec)
If the specification of the pulse width to be measured
is within the range, the 2MHz can be used. Otherwise
change the base frequency of the counter, for
example, you can set counter 2 to cascaded mode,
and use counter 2 to measure the pulse width. The
count range will increase but the resolution will
decrease. Counter 1, 2, and 3 are used in this
example.
Step 3: Connect GATE1 to the signal to be measured.
Step 4:
Write and verify the control program. Refer to
‘DEMO3.C’ source code.
Figure 22: Example of pulse width measurement