Hello,
I have a USB-8452 with the latest software (2.1.2) installed. The host computer is a Core i7. I am trying to achieve the maximum SPI write speed possible with the device. I have tried the SPI Basic Read/Write block, SPI Scripting blocks, and SPI Streaming, but the first two have large delays between CS falling and data being written (along with while loop delays), and the last appears to be useful exclusively for read operations.
Can anyone tell me if there is either a way to a) reduce the setup times for SPI Basic / SPI Scripting or b) write different values within a single SPI Stream? Thanks in advance for any help on this issue, even if it's just confirmation that yes these are hard limitations that can't be overcome with the LabVIEW 8452 interface at this time.
Here is the best I'm able to currently do, as shown on my logic analyzer. Changing the SPI clock speed doesn't affect the setup and delay times that are the primary and secondary bottlenecks:
SPI Basic Read/Write -
Program: Basic setup followed by SPI Write/Read block by itself in a while loop
Primary bottleneck: ~450 us delay between while loop iterations (see capture 2)
Secondary bottleneck: ~6 us delay between falling edge of CS and first clock pulse (see capture 1)
Capture 1 - Highlighting delay between CS falling and first SCLK pulse
Capture 2 - Highlighting delay between while loop iterations
SPI Scripting -
Program: Basic setup followed by two Run Script blocks in a while loop (to check both block to block and loop iteration delays)
Primary bottleneck: ~450 us delay between while loop iterations (see capture 3, space between second and third captured frames)
Secondary bottleneck: ~250 us delay between consecutive Run Script blocks (see capture 3, space between first and second captured frames)
Capture 3 - Highlighting consecutive Run Script delays and delays between while loop iteration
SPI Streaming - This is the closest to achieving a reasonably fast write speed, but unfotunately it seems to be exclusively useful for read (e.g. ADC) operations, not write.
Program: Basic stream setup followed by Stream Start block
Primary bottleneck: Can't write anything other than single data value to 'Waveform 1 -> MOSI Data' property. I can write an array of bytes to this property, but it will simply put all of those bytes in one frame and repeat this frame (see capture 4) rather than cycling through each value.
Capture 4 - Two bytes sent repeatedly using SPI Stream. CS delay is finally good, but no ability to change MOSI data frame to frame.