National Instruments 700 User Manual

Page 34

Advertising
background image

Chapter 3

Signal Connections

© National Instruments Corporation

3-15

DAQCard-700 User Manual

programmed for various operations. The only exceptions are counter 0, which has an internal
1 MHz clock, and counter 1, which can also be configured to use this clock.

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-700 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-8
shows connections for a typical event-counting operation in which a switch is used to gate the
counter on and off.

100 k

Signal

Source

Switch

13

DGND

Counter

OUT

CLK

GATE

+5 V

I/O Connector

DAQCard-700

Figure 3-8. Event-Counting Application with External Switch Gating

Use level gating to measure pulse width. Apply the pulse to be measured to the counter GATE
input. Load the counter with the known count and program the counter to count down while the
signal at the GATE input is high. The pulse width equals the counter difference (loaded value
minus read value) multiplied by the CLK period.

Advertising