NI USB-845x Hardware Overview

Looking for an SPI or I2C controller for LabVIEW? National Instruments sells the USB-8452 with the 845x drivers. I experienced my fair share of problems using the older USB-8451 for a project, and I documented my findings during a 2018 Chicago LabVIEW User Group meeting. My biggest takeaway is I wish I had bought the 8452 instead of the 8451. Fortunately, the 8451 won’t be sold anymore starting April, 2022. Check out the video below for technical details on how SPI works in the LabVIEW 845x drivers.

Some key takeaways:

  • You don’t need specialized hardware to communicate with SPI and I2C devices using LabVIEW, but it does make things easier.

  • Check out Kevin Darrah for details on bit-banging.

  • 845x driver scripts have a limit to how many commands can be included in each script, enforced at runtime.

  • USB-8451 and USB-8452 cannot be simulated in NI-MAX, at least as of 2018. You’ll need a physical device with your development system.

When it comes to speed and data rate, be aware that you’ll send messages much slower than the max clock speed of your device.

  • Intra-byte delay: If your message contains multiple bytes, there will be a short delay between bytes.

  • Intra-message delay: Between every message the chip select line needs to toggle, which takes time.

  • Script delay: When running one script after another, control goes back to LabVIEW and you’ll experience a millisecond delay. It’s possible this is shorter on a real-time system.

  • Batch delay: This is only present on the USB-8451 and is not documented by National Instruments. The device cannot hold the entire script and a millisecond delay is introduced every 13 messages in my case. Just buy an 8452 and you won’t have to worry about this.

View the slides from my talk in PDF format.