
Chapter 9 Counters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Table | Filters |
|
| ||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| N (Filter Clocks |
|
|
|
| Pulse Width |
| Pulse Width | |||||||||||||||||||
|
|
|
|
|
|
|
|
| Needed to Pass |
|
| Guaranteed to Pass |
| Guaranteed to Not | |||||||||||||||||||||
Filter Setting |
|
|
|
|
|
| Signal) |
|
|
|
|
|
| Filter |
| Pass Filter | |||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 ns |
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 125 ns |
| 100 ns | ||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6.425 µs |
|
| 257 |
|
|
|
|
|
|
|
|
| 6.425 µs |
| 6.400 µs | ||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2.55 ms |
|
| ~101,800 |
|
|
|
|
|
|
|
| 2.55 ms |
| 2.54 ms | |||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Disabled |
|
|
|
|
|
|
|
| — |
|
|
|
|
|
|
| — |
| — | ||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
| The filter setting for each input can be configured independently. On power | ||||||||||||||||||||||||||||
|
|
|
|
|
|
| up, the filters are disabled. Figure | ||||||||||||||||||||||||||||
|
|
|
|
|
|
| transition on an input that has its filter set to 125 ns (N = 5). | ||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PFI Terminal |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Filtered input goes high | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| when terminal is sampled | |
Filter Clock |
|
|
| 1 | 1 2 3 4 |
|
| 1 | 2 3 4 5 |
|
|
|
| high on five consecutive | |||||||||||||||||||||
(40 MHz) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| filter clocks. | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Filtered Input |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Figure
Enabling filters introduces jitter on the input signal. For the 125 ns and 6.425 µs filter settings, the jitter is up to 25 ns. On the 2.55 ms setting, the jitter is up to 10.025 µs.
Refer to the KnowledgeBase document, Digital Filtering with M Series, for more information about digital filters and counters. To access this KnowledgeBase, go to ni.com/info and enter the info code rddfms.
Prescaling
Prescaling allows the counter to count a signal that is faster than the maximum timebase of the counter. M Series devices offer 8X and 2X prescaling on each counter (prescaling can be disabled). Each prescaler consists of a small, simple counter that counts to eight (or two) and rolls over. This counter can run faster than the larger counters, which simply count the rollovers of this smaller counter. Thus, the prescaler acts as a frequency divider on the Source and puts out a frequency that is
ni.com |