From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use SPI Script usb-8451?

I need to send 11 bits of data (vs 8 bits) over the SPI of the USB-8451. I believe that the Advanced API should do this but I do not know how to set-up the script. Code in MS C/C++ would be nice or a basic program flow would do. I could not find and C/C++ examples, only LabView examples. Any guidance would be appreciated.

0 Kudos
Message 1 of 3
(3,978 Views)

Have you looked at the NI-845x Software User Manual?

 

Pages 7-3 to 7-6 describe the Advanced API and include a programming example using the scriptingfunctions of the Advanced API.

 

 

 

 

---

Peter Flores
Applications Engineer
0 Kudos
Message 2 of 3
(3,966 Views)
I was mistaken about the 11 bits it is 11 data+5 address=16 bits. Now the issue I have is with the 'delay' between the 2 8-bit transfers. I thought that I would be able to removed this delay but I guess it is overhead required to load the SPI shift register. If only NI had a product that was 32 bits deed and routines to 'chop' it up into bytes, words, etc... Both the BASIC and ADVANCED APIs have the delay embedded in them, any suggestions?
0 Kudos
Message 3 of 3
(3,958 Views)