Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency divider/ pulse generation from 1 to n

Hi,

I have a sample pulse which in some cases needs to be divided. I tried to use the pulse train generation function, which works fine (giving me a pulse every n sample pulses), but only starting at 2 input pulses. I need to be able to use this function from a division of 1 and up.
Put in another way, can a counter be configured in such a way that it outputs a pulse every rising edge of the source signal?

I'm using a PXI 6602 counter card and am programming it through calls to NIDAQ32.DLL under Labview 7.
0 Kudos
Message 1 of 3
(3,581 Views)
Hi Walter,

In short, no. You can't output a pulse on every input pulse. You can however configure the degree of division. Here are the rules for division:

When set to pulse train generation, you will have a register for the low value of the pulse train and a register for the high value. What happens in typical pulse generation is that these registers are loaded with count values such as 2 and 2 for each register respectively. In default operation, the first register will count 2 pulses on the source and then toggle the output. The second register will then count to pulses and toggle the output again. The operation then cycles back to the first register. This toggling effectively creates a pulse train that is divided by 4 and a duty cycle of 50%.


You can however change the output mode to pulse instead of toggling upon completion of counting on a register. In the above example, you would count 2 source edges and then pulse for the first register and the count 2 more edges and pulse again for the second register. You will of course repeat this in pulse train generation mode. This mode allows you to obtain greater resolution since you are now dividing by 2 but your duty cycle will be different. Each pulsed output will be equivalent in size to the source pulse width.

Finally, the two registers can be populated with integer values of 2 or greater. Therefore, the smallest frequency division is 2.

You will have to work with these three elements to obtain the pulse train of your desired frequency. Hope that helps. Have a good day.

Ron
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(3,579 Views)
I was afraid of this. I'll just check for the division of 1 and if so, I'll use Select_Signal to re-route the input signal directly onto the output line (RTSI).

Thanks anyway.

Walter Tansini
0 Kudos
Message 3 of 3
(3,579 Views)