Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-8452 USB 2 SPI box not communicating continuosly

Hopefully this is the correct forum.

 

I have a USB-8452 that I am using to talk to some equipment with over a SPI bus. The problem is that when increasing the clock rate, that doesn't speed up the communication as a whole.

 

Scope captures....

Clock at Lower frequency (KHZ)

It looks ok but has pauses between the bursts of 8. (It's writing from an array of 8-bit unsigned as the out of the box VI requires)

Clock @ Lower Frequency.png

Clock at Higher frequency (MHZ)

The clock speed increases but the breaks between the communication remain the same.... this seems totally wrong to me.

 

Clock @ Higher Frequency.png

Can anyone offer insight on how to correct this so it's a continuous clocking of data?

Thanks,

Kellen

 

 

0 Kudos
Message 1 of 4
(2,858 Views)

Hi Kellen,

 

I'd be interested to see the implementation of this in code.  How much data are you writing to the SPI bus at a time from your computer?  Does this correspond to the data per grouping? 

 

Right now without more detail, my instinct is that the CPU has its own rate it is running at that corresponds to the gaps.  This is how fast information will be pushed to the USB.  The USB then sends this data out at the faster clock speed.

Trevor H.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,829 Views)

In software I am straight up clocking out 100 bytes and so it should be continuously clocked out but is not. In this instance the write_data_cmd array has a 100 byte array that is being fed in. 

 

SPI_Example.png

0 Kudos
Message 3 of 4
(2,820 Views)

You may want to look at Understanding the SPI Bus with NI LabVIEW: SPI Timing Considerations.  These two time periods have minimum and maximum values.  What is the current length of them?

Trevor H.
Technical Support Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,807 Views)