Signal Connections
Chapter 3
DAQCard-500 User Manual
3-8
© National Instruments Corporation
The MSM82C54 counter/timer is described briefly in Chapter 4, Theory of Operation. For more
detailed programming information, consult the MSM82C54 Data Sheet in the optional
DAQCard-500 Register-Level Programmer Manual.
To perform pulse and square wave generation, program a counter to generate a timing signal at
its OUT output pin.
To count events, program a counter to count rising or falling edges applied to any of the
MSM82C54 CLK inputs. You can then read the counter value to determine the number of edges
that have occurred. You can gate counter operation on and off during event counting. Figure
3-5 shows connections for a typical event-counting operation in which a switch is used to gate
counter 2 on and off.
100 k
Ω
1 MHz
Switch
DGND
Counter 2
OUT
CLK
GATE
+5 V
20
27
I/O Connector
DAQCard-500
26
24
25
Figure 3-5. Event-Counting Application with External Switch Gating
Use level gating to measure pulse width. Apply the pulse to be measured to the GATE2 input.
Load the counter with the known count and program the counter to count down while the signal
at the GATE2 input is high. The pulse width equals the counter difference (loaded value minus
read value) multiplied by the CLK2 period.
To measure time lapse, program counter 2 to be edge gated. Apply an edge to the GATE2 input
to start the counter. Program counter 2 to start counting after receiving a low-to-high edge. The
time lapse since receiving the edge equals the counter value difference (loaded value minus the
read value) multiplied by the CLK2 period.