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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deactivation of the sample clock

Hello,

 

is it possible to activate / deactivate the sample clock in LabVIEW? Smiley Surprised

 

My problem: I have built me an SPI VI, but it does not support my goals needed for timing. (I want to use it with high clocktimes, that's why I use a NI 6537 IO Card)

 

So I intend to stop the Sample Clock till CS is down, REACTIVATE it as long as CS is low and deactivate it when CS is high again. If this is possible?

 

If you need more information, feel free to ask.

 

Regards

Christoph

0 Kudos
Message 1 of 5
(2,355 Views)

Here are 2 screenshots and the Read/Write part of my program.

 

First picture shows CLK with CS and SDI, second picture only CLK and SDI.

 

What I need is the following case:

 

CS is high, CLK low. CS goes low, and NOW CLK starts. At the moment the CLK is already running before CS is going to state low.

 

Thanks for any hints or solution.

 

Regards Chris

Download All
0 Kudos
Message 2 of 5
(2,325 Views)

Hi Chris,

 

if PFI4 is your CS Signal, the sample clock actually should start only when PFI4 is actually seeing a falling edge.

Which signal is connected to PF4 in your setup?

 

 

Marco Brauner NIG

0 Kudos
Message 3 of 5
(2,305 Views)

Hey SierraKilo,

 

Have you seen the following two articles about creating SPI signals and using hardware to generate those signals:

SPI Digital Waveform Reference Library

Serial Protocol Communication Reference Design for Digital Waveform Devices

 

The first document talks about how you can use a data line for the CLK, not the actual clock of the device. In the second link, there is a section in that document that talks about how to use the 6535/6/7 to generate/acquire the SPI data generated from the first document. There is code attached to each of the DevZone docs. So basically, you will use data lines to generate the data, not the actual clock of the device.

 

I hope these documents help. Please let us know if there are further questions or concerns. Thanks, and have a great day.

 

Regards,

DJ L.

0 Kudos
Message 4 of 5
(2,289 Views)

Hello SierraKilo,

 

I also recommend to use the SPI-Library. I just explained my colleague, who is answering your thread regarding error -200562, what to do 

to get around the error. He will post it into the thread.

 

regards

 

Marco Brauner

0 Kudos
Message 5 of 5
(2,266 Views)