LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-8451 Inter-Byte Setup Delay

Greetings,

 

I'm working with an FPGA that has registers programmed VIA SPI.

 

I've attached a snapshot of a 3-byte packet that's correct, but has some features that I would like to adjust if possible.

 

First, the top data is Chip Select, the middle data is the data bytes (MOSI), and the bottom is the clock data. Please disregard the names (Anode, Cathode, etc., as this is from a prior measurement)

 

The delay between byes (called the setup delay in SPI parlance), can it be adjusted, or is this fixed?

 

The MOSI data defaults to high state when not writing data. I know the clock can be set to "idle high" or "idle low", but can the MOSI also be set similarly, in which case I'd like for it to be low before data, during the setup time, and after data.

 

I don't have HSDIO board to use, so I'm stuck with the USB device at the moment.

 

Thanks in advance,

 

TR

><><><><><><
Tommy R.
><><><><><><
0 Kudos
Message 1 of 7
(2,958 Views)

Hello trouinky

 

You can find the answer in the NI-845x Hardware and Software Manual on page 11-2 under the title "SPI Timing Characteristics".

 

The concept there is the "SCLK setup time". 

 

Regards

Frank R.

0 Kudos
Message 2 of 7
(2,893 Views)

Yep, I've got that far, but I don't see in any of the scripted VI's that allow you to actually change this parameter. The only thing I see having to do with timing is a "Delay Microsecond" or "Delay Millisecond" but this setting doesn't affect the setup time between bytes, only how long the chip select is low before data starts to transmit/recieve. The SPI configuration node only allows manipulation of ChipSelect, ClockRate, Clock Polarity, and Clock Phase. (Well number of bytes per sample too, but not for my particular device).

 

What I'm needing to do is to minimize the setup time to the lowest possible value to match the custom device I'm trying to program (it's a SPI-"like" interface). I realize this is a strech with the USB device, but we've got no budget for an HSDIO card.

 

Preciate the info,

 

TR

><><><><><><
Tommy R.
><><><><><><
0 Kudos
Message 3 of 7
(2,884 Views)

Hello trouinky

 

Have you reviewed the context help of the "SPI stream configuration" node.

 

Capture.PNG

 

You might get something from there if you play with those timing properties.

 

Regards

Frank R.

0 Kudos
Message 4 of 7
(2,835 Views)

Perfect. Unfortunately for me, there's a little sentence that puts a dagger in my plans.

 

"Note that the SPI Stream API is not available for the NI-8451."

 

That's the device I have.

 

Now off to figure something else out...

 

Thanks for the help.

 

TR

 

 

><><><><><><
Tommy R.
><><><><><><
0 Kudos
Message 5 of 7
(2,814 Views)

I have the same question. Were you able to get this resolved. At least being low on the mosi line?

0 Kudos
Message 6 of 7
(2,473 Views)

Nope, never got it to work. Switched to an Arduino Pro!

This was a while ago, so maybe the drivers have been updated to support this, but we've moved on from that project...

Good luck!

TR

><><><><><><
Tommy R.
><><><><><><
0 Kudos
Message 7 of 7
(2,433 Views)