Chapter 4
General-Purpose Counter/Timer
DAQ-STC Technical Reference Manual
4-8
©
National Instruments Corporation
latches the counter value for software read. An interrupt notifies the CPU after each period so
that the interrupt software can read the value in the HW save register. Figure 4-9 shows two
periods of a buffered period measurement where the period is three G_SOURCE rising edges.
Figure 4-9.
Buffered Period Measurement
4.4.2.4 Buffered Semiperiod Measurement
Buffered semiperiod measurement is similar to buffered period measurement, except that the
measurements are taken over every semiperiod. The counter uses G_SOURCE to measure
each half-period of the signal present on the G_GATE input, counting the number of rising
edges that occur on G_SOURCE while G_GATE remains in an active and in an inactive state.
At the completion of each semiperiod interval for G_GATE, the HW save register latches the
count value for software read. An interrupt notifies the CPU after each semiperiod so that the
interrupt software can read the value in the HW save register. Figure 4-10 shows three
semiperiods of a buffered semiperiod measurement where the first semiperiod is three
G_SOURCE rising edges, the second semiperiod is one G_SOURCE rising edge, and the
final semiperiod is two G_SOURCE rising edges. Notice that you do not know whether the
first value is saved on a rising edge or a falling edge.
Figure 4-10.
Buffered Semiperiod Measurement
G_SOURCE
G_GATE
Counter Value
HW Save Register
1
0
3
3
3
3
1
1
2
2
G_SOURCE
G_GATE
Counter Value
HW Save Register
1
0
3
3
2
2
1
1
1
1
2