Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

can we generate frequency using counters . if so then what is the range and resolution.

can we generate frequency using counters ??. if so then what is the range and resolution.
Please reply as soon as possible
its urgent
0 Kudos
Message 1 of 4

Because the M-series boards have an 80 MHz internal timebase, the highest frequency you can generate with normal methods is 20 MHz (2 cycles low, 2 cycles high).

The resolution you can achieve is based on integer divisors of 80 MHz.  As you divide by 4,5,6,7,8 you produce pulsetrains of 20 MHz, 16 MHz, 13.3333 MHz, 11.4286 MHz, 10 MHz.  Generally, you'll get better freq resolution as the pulsetrain's base frequency decreases.

I haven't verified this, but the M-series boards might support a more advanced configuration option that can produce a 40 MHz output.  First some background, using the example where you want the maximum output frequency with 2 cycles low and 2 cycles high.

Internally, the value 2 (# low cycles) is placed in the count register.  Each active edge of the timebase will decrement this value.  When the decrement causes the value to reach "terminal count", or 0, the counter's output will toggle from high to low.  Then the other value 2 (# high cycles) is placed in the count register.  Again, each active timebase edge decrements the count.  When it reaches 0, the output toggles again.

So, every 2 cycles of the timebase, the output changes state -- 1 rising and 1 falling edge.  So there are 4 cycles between consecutive rising edges.

So how might you get 40 MHz?  Well, there is an option available to configure the output to pulse on terminal count rather than toggle.  Then each time the count reaches 0, the output will produce a pulse whose duration is 1 cycle of an internal timebase.  If the M-series boards use their internal 80 MHz timebase for this pulse, then you could end up with an output that creates a 1 cycle wide pulse every 2 cycles.  The effect is a 40 MHz pulsetrain output.

However, it's also possible that the M-series boards will use their 20 Mhz timebase for this pulse (just like the E-series boards did), in which case 20 Mhz would still be the maximum output frequency.  Unfortuantely I'm not near any hardware to test this out.

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?

(Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).

Message 2 of 4

Hello Kevin

Thanks for reply.

Can u tell me , what is the minimum frequency we can generate using M Series (PCI 6221 68 pin) card?. What is the lowest value of divisor?. what do you mean be 80 MHz internal timebase?.what do u mean be -2 cycles low, 2 cycles high.?

0 Kudos
Message 3 of 4
Hi raman,
If you want to get a very low frequency output, you'll want to use the slowest internal timebase.  The counter on your card has three different timebases, 80MHz, 20MHz, and 100KHz.  Since the counter is 32 bit, the lowest frequency we can achieve would be by counting to (2^32-1) using the 100KHz timebase, then toggling the output state.  This means that the lowest frequency we can output is:
{ 100000 / [(2^31) - 1] } / 2 = 0.0000116415 Hz
For more information on how the TIO counters work, see the following KnowledgeBase article:
I hope this helps!
Justin M.
National Instruments
ps - only 3 stars for Kevin??  I thought that was a great answer!

Message Edited by Justin M. on 05-26-2006 11:36 AM

0 Kudos
Message 4 of 4