LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

High Speed Clock Signal Generation Using FPGA Ouput

Solved!
Go to solution

Hi,

 

5MHz CLK Gen.png

 

This a screen shot of a LabVIEW FPGA program. Here I am trying to generate 5MHz Clock signal at Connector 0 DIO12. But I get around 2MHz when I measure the signal using an oscilloscope. Would some tell me what’s wrong ?

 

LabVIEW 2011

FPGA Target  : PXI 7841

I set DIO 12 to Nerver Arbitrate in the property setting.

 

 

 

Adarsh
CLA - Certified LabVIEW

Architect
https://www.youracclaim.com/badges/4871da75-1b8b-422a-a881-9ab206d2d36d/public_url
0 Kudos
Message 1 of 6
(2,912 Views)
Solution
Accepted by topic author Adarsh

You are reading in one port, negating it and sending it back out over the same port?

 

You know you can have some delays in there, right?  Your output value on the DIO output doesn't instantly mirror on the input.  I've done things like this in the past (at 40MHz) and the delay (depending on the hardware being used) can be several cycles.

 

Try replacing the DIO Read with a simple shift register negating the boolean and using the HDIO12 purely as an output.

Message 2 of 6
(2,904 Views)

Thank you for the reply!

 

As it’s an FPGA output I was assuming that there is no delay in updating i/o(it’s a routing right?). I will try the method you suggested.

 

Thank you

Adarsh

Adarsh
CLA - Certified LabVIEW

Architect
https://www.youracclaim.com/badges/4871da75-1b8b-422a-a881-9ab206d2d36d/public_url
0 Kudos
Message 3 of 6
(2,888 Views)

Its working. Thank you!

Adarsh
CLA - Certified LabVIEW

Architect
https://www.youracclaim.com/badges/4871da75-1b8b-422a-a881-9ab206d2d36d/public_url
0 Kudos
Message 4 of 6
(2,876 Views)

I'm not certain but maybe some of the delay is happening because you are changing the mode of the pin.  According to the specs on the card it is capable of having a Maximum Clock Rate of 40MHz under the DIO section.  So if you are purely doing digital reads, or digital writes you should be able to update/read 40,000,000 times a second.  If you perform a read, which can take up to 1/40M of a second, then invert which takes some time but practically none, then another write which can take up to 1/40M of a second, your loop rate should still be faster than the 10MHz you showed.  That's why I suspect there is time involved in changing over the pin from a read mode to a write.

 

If you try to do something similar with the analog you'll notice the maximum update rate is only 1MHz.  So while your logic and code can run at 40MHz you can only update the analog value at 1MHz.  Because of this in the past I have had two loops.  One running a at the maximum clock rate doing the logic calculations, and then sending the result to another loop that updates the output at the maximum rate which in the case of an analog out is only 1MHz.

0 Kudos
Message 5 of 6
(2,865 Views)

It makes sense, I appreciate your information. Thank you!

 

Adarsh

Adarsh
CLA - Certified LabVIEW

Architect
https://www.youracclaim.com/badges/4871da75-1b8b-422a-a881-9ab206d2d36d/public_url
0 Kudos
Message 6 of 6
(2,832 Views)