Chapter 8
Counters
©
National Instruments Corporation
8-33
Cascading Counters
Yo
u
can internally ro
u
te the Co
u
nter
n
Internal O
u
tp
u
t and Co
u
nter
n
TC
signals of each co
u
nter to Gate inp
u
ts of the other co
u
nter. By cascading
two co
u
nters together, yo
u
can effectively create a 64-bit co
u
nter. By
cascading co
u
nters, yo
u
also can enable other applications. For example,
to improve the acc
u
racy of freq
u
ency meas
u
rements,
u
se reciprocal
freq
u
ency meas
u
rement, as described in the
b
u
llet of the
section.
Counter Filters
Yo
u
can enable a programmable debo
u
ncing filter on each PFI signal.
When the filters are enabled, yo
u
r device samples the inp
u
t on each rising
edge of a filter clock. USB-621
x
devices
u
se an onboard oscillator to
generate the filter clock with a 40 MHz freq
u
ency.
Note
NI-DAQmx
only
s
u
pports filters on co
u
nter inp
u
ts.
The following is an example of low to high transitions of the inp
u
t signal.
High to low transitions work similarly.
Ass
u
me that an inp
u
t terminal has been low for a long time. The inp
u
t
terminal then changes from low to high, b
u
t glitches several times. When
the filter clock has sampled the signal high on N consec
u
tive edges, the low
to high transition is propagated to the rest of the circ
u
it. The val
u
e of N
depends on the filter setting; refer to Table 8-5.
The filter setting for each inp
u
t can be config
u
red independently. On power
u
p, the filters are disabled. Fig
u
re 8-29 shows an example of a low to high
transition on an inp
u
t that has its filter set to 125 ns (N = 5).
Table 8-5.
Filters
Filter Setting
N (Filter Clocks
Needed to
Pass Signal)
Pulse Width
Guaranteed to
Pass Filter
Pulse Width
Guaranteed to
Not Pass Filter
125 ns
5
125 ns
100 ns
6.425
μ
s
257
6.425
μ
s
6.400
μ
s
2.56 ms
~101,800
2.56 ms
2.54 ms
Disabled
—
—
—