Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA myRIO read frame from SENT- signal

Solved!
Go to solution

Hello Community,

 

i have now a myRIO with Labview 2013. I try to read a digital signal of a sensor on port DIO0 (C-Port). It works fine. The problem is that i don't know, how can i find the beginning (the SYNC Nibble) of the SENT- Frame and how does it works with the clock ticks/ clock time of the FPGA System (40Mhz). I don't understand the meaning of the clock time. clock ticks.

The next problem is to measure the time between falling edge to falling edge. Actually i can detect every falling edge of the SENT signal but i can't measure the real time between them. How can i measure the real time depending of the clock time of the FPGA system? The SYNC Nibble have every time 56 ticks. But how much time are the 56 ticks?

 

Best regards,

 

Basti

0 Kudos
Message 1 of 4
(6,294 Views)

What device are you trying to communicate with?  What is its communication protocol?  That likely tells you how you can determine when it is sending data.

 

I'm going to assume your loop is running much quicker than your data is changing.  If that's the case, you can use that information to determine how long it takes between rising edges.

0 Kudos
Message 2 of 4
(6,276 Views)

Hello blackhack999,

 

Can you please post your code to see how the detection is implemented at the moment, then i can lock into it.

 

Here one way, how it can be done to measure the time between rising and falling edge on a FPGA

I have not tested the code at the moment, but it should work.

 

Every tick takes 25ns with the default 40Mhz clock.

 

 

Picture1.jpeg

 

 

 

 

Hope it helps.

best regards
Alexander
0 Kudos
Message 3 of 4
(6,262 Views)
Solution
Accepted by topic author blackhack999

Hello Alexander,

 

thank you. It works fine. 

 

Now my problems are solved. The main problem was to build a factor who is able to convert the 56 ticks of the SYNC- SENT- signal to the correct ticks of the sampled signal. The two frequencies from the SENT- Signal (333kHz) and the sampled signal (40Mhz) are different so i have divided the sampled signal frequency by the SENT- Signal frequency (Factor of about 120). Now i can convert the 56 ticks to correct number of ticks from the sampled signal and i can find the SYNC- Puls in the SENT- Frame. The outcome of 56 ticks times the factor of 120 is 6720 ticks. Therefore i have convert the ticks to the correct frequency.

 

Thank you for your help!

 

Best regards,

 

Sebastian

0 Kudos
Message 4 of 4
(6,254 Views)