02-06-2014 12:32 PM
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
02-07-2014 10:03 AM
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.
02-07-2014 12:35 PM
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
02-10-2014 12:48 PM
Hello trouinky
Have you reviewed the context help of the "SPI stream configuration" node.
You might get something from there if you play with those timing properties.
Regards
Frank R.
02-10-2014 04:27 PM
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
05-21-2018 10:33 PM
I have the same question. Were you able to get this resolved. At least being low on the mosi line?
05-30-2018 03:28 PM
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