From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital burst USB-6229

Looking for some guidance.  I want to clock out a 16 bit word at 1MHz.  I need some data setup time (1uS) before  clock  edge.

Data   ____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|____|¯¯¯¯|

Clock ______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_______|¯|_

Using static IO I can not achieve the desired output timing requirements.

I am using Measurement Stuidio, C#

What direction should I be looking. 
1) Establish the clock
2) Set the relative timing of the edges


Thanks Errol
ekorpinen@pulsewaverf.com
0 Kudos
Message 1 of 3
(3,275 Views)

If I understand correctly, both the 16-bit data word and the clock signal are being generated as part of an interface to some other piece of equipment.  That device is going to read the 16-bit word when it sees your clock's rising edge.  Right so far?

You'll definitely need to use the "correlated DIO" feature to give you 1 MHz sample timing.  In that mode, you'll be required to supply a sample clock source signal to your digital output task.  The most typical way to do it is with a counter pulsetrain task.

Now here's the neat trick part.  You can make your pulsetrain to have opposite polarity, so that it's normally high while making a low-going pulse.  Then you can make your DO task generate its output on the *falling* edge (which will be the leading edge) of the pulsetrain.  Then the clock's *rising* edge (which will be the trailing edge) can come after 1 usec+ of stabilization time to signal the external device to capture your 16-bit word.

Note: you said you want to generate at 1 MHz while also having a 1 usec setup time.  These specs are in conflict.  With 1 usec setup time and some amount of stable capture time allotted, you'll have to update at < 1 MHz.

-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).
0 Kudos
Message 2 of 3
(3,263 Views)
Thanks for the info and you were correct i should've caught the discrepency between setup time and clock rate.  I suspected they wantted >=200nS setup time. 
I will code it up and see how it comes together.  I have never used the counters  before so  this is something new.
0 Kudos
Message 3 of 3
(3,259 Views)