03-27-2007 03:08 PM
03-28-2007 01:07 PM
Hi Kaspar,
Just to clarify, are you looking at the NI-845X SPI Script Write Read.vi under the SPI Advanced palette? The data type input here is an array of U8's (bytes), so it does not look you would be able to write out bits that aren't in the byte format (half-bytes without having zeros appended & so on..) You may also find this knowledgebase article on whether the USB-8451 Supports 16-bit Transfers. Hope this helps!
03-29-2007 07:58 AM
Hello,
Thanks for the response to my question. I am able to send multiple bytes to a SPI device by simply building a byte array with all of the bytes that the SPI device requires. I need to understand how to read multiple bytes back from a SPI device . Do you know what determines how many bytes to read from a SPI device?
Regards
03-30-2007 12:10 PM
Hi Kaspar,
The technique to read multiple bytes from an SPI device may vary from device to device, so I would recommend referencing your device manual first. However, for the SPI Example programs included with the I2C/SPI driver with LabVIEW, you first specify the address that you want to read from, and then you specify an array of X empty bytes. Starting at the specified address, the SPI device will shift out X bytes to be read into your program. The examples for Basic and Advanced SPI programming have been commented to describe each step in the process, so they might be a good reference for you. You can find them under Help>>Find Examples... and then looking under Hardware Input and Output>>I2C and SPI. Hope this helps!