Chapter 8
Counters
©
National Instruments Corporation
8-25
Frequency Generation
Yo
u
can generate a freq
u
ency by
u
sing a co
u
nter in p
u
lse train generation
mode or by
u
sing the freq
u
ency generator circ
u
it.
Using the Frequency Generator
The freq
u
ency generator can o
u
tp
u
t a sq
u
are wave at many different
freq
u
encies. The freq
u
ency generator is independent of the two
general-p
u
rpose 32-bit co
u
nter/timer mod
u
les on USB-621
x
devices.
Fig
u
re 8-27 shows a block diagram of the freq
u
ency generator.
Figure 8-27.
Frequency Generator Block Diagram
The freq
u
ency generator generates the Freq
u
ency O
u
tp
u
t signal. The
Freq
u
ency O
u
tp
u
t signal is the Freq
u
ency O
u
tp
u
t Timebase divided by a
n
u
mber yo
u
select from 1 to 16. The Freq
u
ency O
u
tp
u
t Timebase can be
either the 20 MHz Timebase divided by 2 or the 100 kHz Timebase.
The d
u
ty cycle of Freq
u
ency O
u
tp
u
t is 50% if the divider is either 1 or an
even n
u
mber. For an odd divider, s
u
ppose the divider is set to D. In this
case, Freq
u
ency O
u
tp
u
t is low for (D + 1)/2 cycles and high for (D – 1)/2
cycles of the Freq
u
ency O
u
tp
u
t Timebase.
Fig
u
re 8-28 shows the freq
u
ency generator o
u
tp
u
t waveform when the
divider is set to 5.
Figure 8-28.
Frequency Generator Output Waveform
100 kHz Time
bas
e
20 MHz Time
bas
e
Freq
u
ency
O
u
tp
u
t
Time
bas
e
FREQ OUT
Divi
s
or
(1–16)
Freq
u
ency Gener
a
tor
÷
2
Freq
u
ency
O
u
tp
u
t
Time
bas
e
FREQ OUT
(Divi
s
or = 5)