LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-USB-8451 SPI data throughput

I am working with the NI-USB-8451 module.

Clock freq = 12Mhz

When I send 400 bytes of data as a block it gets broken up into 100 byte groups with ~1msec between groups.

I also measure ~10 microsecond interbyte spacing.

Please see my complete report with o-scope pictures.

It now takes 22 miliseconds per 1000 bytes sent, and nearly all this time is spent NOT sending data over the SPI bus.

Why the huge overhead and latency ?

Can this be changed by me?

 

Thanks,

Thomas Plummer

LabVIEW programmer

Download All
0 Kudos
Message 1 of 3
(3,804 Views)

Thomas,

 

Great report, by the way! It was really helpful in picturing what you were describing.

 

First, the inter-byte delay.

Why? - NI-845x Software User Manual, page 7-2 describes this as SCLK setup time and says this could last between 8.5 and 19 us.

Can I control this? - Yes. Page 7-3 of the manual describes the NI-845x SPI Advanced Programming Model. This allows you to control this delay, but you would only have ms resolution, slowing down the overall throughput.

 

Now, the inter-group delay.

Why? - The 8451 utilizes a 128-byte buffer for the write operation (there is also a128-byte buffer for read). This can be used up to 80% and will take between 1 and 2 ms to refill the buffer between 100-byte groups. Also, note that this becomes a 1 to 2 ms delay between 50-byte groups when using the afore mentioned NI-845x SPI Advanced Programming Model.

 

 

Peter Flores

Applications Engineer

National Instruments

---

Peter Flores
Applications Engineer
Message 2 of 3
(3,765 Views)
FYI: FAQ 8451 SPI
---

Peter Flores
Applications Engineer
0 Kudos
Message 3 of 3
(3,759 Views)