LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for USB-8451 SPI example

Does anyone have a typical SPI example VI for the USB-8451 Interface. I want to program a VI for a SPI device, but I don't know how. This example should include DIO Line programming as well, if possible.
0 Kudos
Message 1 of 7
(6,347 Views)
Hello thmsfrst,

http://zone.ni.com/devzone/conceptd.nsf/webmain/B380E99DAAD898B38625710F007003C5?OpenDocument

This link shows an example how to the USB8451 and the SPI  Interace to evaluate a TI  ADC

The example download does not work so i have attached an example for LV8.0 and one for 7.1.

If you have further questions don't hasitate to ask

Stefan


0 Kudos
Message 2 of 7
(6,324 Views)

Thank you for your help. This example helps, but I still don't understand how to read data out of my SPI device. My SPI device has several registers. Each register has an address and I don't know how to read or write data from/to this registers.

I have a optical mouse sensor chip and I want to read out the motion data as well as the image data. How can I send the address (of my registers) to this device and how can I retrieve the reponse.

0 Kudos
Message 3 of 7
(6,290 Views)
Hello,

In order to communicate  you have to send the instruction words to your device, this can be done (as shown in the example) via the "Script write read VI" in the block conversion and transfer.
This is also mentioned in the article:

http://zone.ni.com/devzone/conceptd.nsf/webmain/b380e99daad898b38625710f007003c5

"For example, many ADCs require the user to write an 8-bit instruction that specifies a register to read. After that instruction is written, a delay is required, followed by dummy data that is written to the slave device (MOSI) to clock out the specified data."

So you have to find out the instruction words from the vendor of your device, and these instructions can be sent -> and the device will respond!

Hope this helps,

Stefan

Message 4 of 7
(6,284 Views)
Thank you. I think, now I should be able to solve it.
0 Kudos
Message 5 of 7
(6,263 Views)

Hi

I am new to the SPI communication.I need some examples for SPI. The examples given with the NI 8451 are good but i required some more examples for clearing the concept.

Can you send me your VIs which you develop for reading registers for the sensor.

I shall be very thankful if you send these VIs. It is very urgent for me.

Thanks

Regards

R

0 Kudos
Message 6 of 7
(6,166 Views)

Hello,

 

  I have downloaded the 8451 SPI example and the file is not recognized by my computer as a Nation Insruments Lab view file. Is there something wrong with this file? Do I have to unzip it in order to use it?

Regards,


Kaspar
0 Kudos
Message 7 of 7
(5,835 Views)