Programming
Chapter 4
AT-DIO-32F User Manual
4-50
© National Instruments Corporation
is a 10-MHz square wave. If the CNT1SRC bit is set, the counting source for Counter 1 is the
output of Counter 3. The same applies for Counter 2. The output of Counter 3 is programmed as
follows:
1. Set up Counter 3 for square wave generation by writing hex 96 to the CNTRCMD Register
for an 8-bit count or hex B6 for a 16-bit count.
2. Write the count to the CNTR3 Register (see Table 4-4). If the count is a 16-bit value, write
the least significant byte first, then the most significant.
The following equation is used to calculate the output frequency of Counter 3:
Counter 3 Output Frequency = 2000000 / data written to counter
Counters 1 and 2 can use either a 10-MHz clock or the output of Counter 3 as the counting
source. If the counting source is the 10-MHz square wave, then the following equation is used to
calculate the output frequency of the counter:
Counter 1, 2 Output Frequency = 10000000 / data written to counter
If the counting source is the output of Counter 3, then the following equation is used for
calculating the output frequency of the counter:
Counter 1, 2 Output Frequency = Counter 3 output frequency / data written to counter
Table 4-5. Counters 1 and 2 Programmable Frequency Output (Source = 10 MHz)
Data Written to CNTR1
Counter Output Frequency
Pattern Interval
or CNTR2 (hex)
FFFF
152.0
Hz
6.58 msec
8000
305.0
Hz
3.28 msec
4000
610.0
Hz
1.67 msec
2000
1.22 kHz
820.0
µ
sec
FFF
2.44 kHz
410.0
µ
sec
A00
3.9
kHz
260.0
µ
sec
800
4.88 kHz
200.0
µ
sec
400
9.76 kHz
100.0
µ
sec
FF
39.0
kHz
25.6
µ
sec
A0
62.5
kHz
16.0
µ
sec
80
78.0
kHz
12.8
µ
sec
60
104.0
kHz
9.6
µ
sec
40
156.0
kHz
6.4
µ
sec
20
313.0
kHz
3.2
µ
sec
10
625.0
kHz
1.6
µ
sec
A
1.0
MHz
1.0
µ
sec
5
2.0
MHz
500.0
nsec
2
5.0
MHz
200.0
nsec
Содержание AT-DIO-32F
Страница 19: ......
Страница 101: ......
Страница 102: ......
Страница 123: ......
Страница 124: ......
Страница 125: ......
Страница 126: ......
Страница 127: ......
Страница 128: ......
Страница 129: ......
Страница 130: ......
Страница 131: ......
Страница 132: ......
Страница 133: ......
Страница 134: ......
Страница 135: ......
Страница 136: ......
Страница 137: ......
Страница 138: ......
Страница 139: ......
Страница 140: ......
Страница 141: ......
Страница 142: ......
Страница 143: ......