6 pulse width measurement – ADLINK ACL-8454/12 User Manual
Page 41
Signal Connections & Applications
• 33
4.6 Pulse Width Measurement
Example : To measure pulse width (with
∆T < 32ms)
step 1: To use fixed clock source as base time interval (or base
frequency).
step 2: Assume Internal 2M Hz clock is used. The time base is
∆
t = 1/2M=5x10e-7 sec
The count range for measuring pulse width is:
∆
t < pulse width <
∆
t *65535 (=32.768 msec)
If the specification of the pulse width to be measured is in the
range, the 2M Hz can be used. Otherwise changing the base
frequency of the counter. The counter #3 is used in this
example.
step 3: Set jumper ‘CK3’ for internal 2 M Hz clock source.
step 4 ~ 6 : Skip these steps.
step 7: The external gate source is just the signal to be measured. The
width of the high pulse can be measured. Note that if the pulse
is shorter, the time resolution is worse. If the pulse is wider, the
limitation of the maximum pulse width should be care.
step 8: The following block diagram illustrates the application.
step 9: Write the control program. Please refer the ‘DEMO3.C’ source
code.
2 M Hz
COUT3
Counter #3
8254 Chip #1
C
G
O
Jumper
CK3
Jumper
CLOCK1
Signal to be measured
Pulse Width
Polling D/I for checking the
end of a pulse
Figure 4.4 Example of pulse width measurement