LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB 8451

Hello All
 
In one of the application  ,i have to interface three sensore (please see attached .pdf file) with NI USB 8451 using SPI communication.
I donot know how to interface them ,
please help
It is very urgent
Thanks and regards
0 Kudos
Message 1 of 10
(7,573 Views)
 

Hi,

What problems are you having? Are you receiving errors? Here are some resources for the USB-8451.

NI-845x Software User Manual

USB-8451 Specifications

Using the National Instruments USB-8451 I2C and SPI Interface to Evaluate a Texas Instruments Analog...

Based on the data sheet you posted, the clock rate should be set to 1 MHz. Please let me know if you have any specific questions I can help you with.

Regards,

Missy S.
Project Engineer
RoviSys
Message 2 of 10
(7,550 Views)

Hi,

The ADNS-5020 uses I2C communication. I hope you are just using the term "SPI" in a generic sense in your inquiry because the 5020 will not talk SPI. And if you are interfacing three sensors as you have indicated you need to make sure you interface them to the oppropriate communication channel, either SPI or I2C. You address the specific sensor by using the slave select. If you have more than one sensor on either the SPI or the I2C bus you can only address one sensor at a time by using slave select. In addition the 5020 does not have an interrupt output so you need to poll the sensor for motion data.

Regards,

New LV User

 

0 Kudos
Message 3 of 10
(7,505 Views)

Hi

Thanks for reply.

I am using SPI communication with ADNS-5020 not I2C. I have to interface 6 sensors with NI 8451 card.

Can I capture the data simultaneously from all the 6 sensors or there should be some time delay between data acquisition from the any two sensors.

Please reply as soon as possible

Regards

R

0 Kudos
Message 4 of 10
(7,484 Views)

I don't think you can capture the motion data from all six sensors simultaneously using the 8541 I2C channel. The I2C is a bus and you can only address one slave device at a time with the 8451. To capture data from all six slave devices you probably will have to use the DIO port and bit-bang your own I2C. You'll use one of the I/O as clock, which can be common to all six slaves. Then each of the SDIO is connected to their own I/O. Since you want to address all six sensors at the same time you can use one remaining I/O line as a common slave select. Your routine will have to switch the I/O from output to input after setting up the addresses to read from each of the sensor. You should use the Burst Mode as you can read continuously without sending the regsiter address repeatedly, which will cause delay.

Depends on the motion, if the velocity and acceleration are high the 8451 may not be able to keep up. Then you maybe better off by having six separate microcontroller doing the I2C communications at the hardware level with the sensors and use the 8451 to manage the captured data.

Hope this helps.

New LV User

 

 

Message 5 of 10
(7,462 Views)

Hi

Thanks for reply.

As i told earlier , i am not using I2C communication but I am using SPI communication.

So Please reply considering SPI communication not I2C.

Regards

R

0 Kudos
Message 6 of 10
(7,436 Views)

Yes, R. I am sorry I kept thinking of I2C but the concept for SPI is the same. It's a bus and you have six slave devices. You will not be able to get data from all six slaves simultaneously using the 8451. You can have common SCLK, MISO and MOSI for all the six slaves; but you'll have to use six separate Slave Selects (using the DIO) to read motion data from each sensor; one at a time. Once motion starts the sensors are going to accumulate delta x and Delta y counts. Depends on how much motion you are trying to record this process may or may not be able to complete the six sensor reads before some of the the delta x and delta y accumulators overflow. At that point you begin to miss motion data. Obviously depends on your application this may not be an issue.

Regards,

New LV User

Message 7 of 10
(7,424 Views)

Hello, R:

I did some additional thinking of your application with six 5020 motion senors. I thought of a way to read the six sensors simultaneously with the 8451.

You would bus the SCLK, MOSI and Slave Select signals of the six sensors together. These three signals are then controlled by the 8451 SPI port and one of the Slave Selects.

Each of the 5020 sensor will have a MISO left. You'll use six DIO lines to receive from each of the MISO.

When you read the motion data, you'll be reading from the same registers of the six sensors and so therfore you'll be able to send the register address on the common MOSI and clock with SCLK.

Now,  set up the DIO port as input and perform a port read. You'll be capturing the motion data from the six 5020 simultaneously. You'll have to manage the accumulation of these bits, each DIO input associates with one of the sensors.

Again, depends on the speed and acceleration of your motion you may have to adjust the SCLK in order to capture all the motion data.

Hope this helps.

Regards,

New LV User 

 

Message 8 of 10
(7,359 Views)
Hi,
I'm slowly getting to grips with labview and perhaps I'm complicating the use of the USB8451.  I'm writing to a DAC (MAX5735)  and the DAC takes 32bit words SPI.  How does the spi write read.vi manage the data that you input to it.  i.e. do I have to submit data in a 32bit x W (where W is the numberr of words) array?
 
Perhaps a clearer question.  It clearly automatically manages the CS line, when is CS set high or low?  i.e if I built an array of 4 x 8bits would it clock in all 32 bits in one CS cycle or would it clock in each byte with its own CS cycle?
 
Thanks,
 
Matt
0 Kudos
Message 9 of 10
(7,222 Views)
 Hi,

You would bus the SCLK, MOSI and Slave Select signals of the three sensors together. These three signals are then controlled by the 8451 SPI port and one of the Slave Selects.

Each of the 5020 sensor will have a MISO left. You'll use three DIO lines to receive from each of the MISO.

The problem with the 5020 is that the SDIO is bidirectional. So you'll have to use a circuit that can help you separate the signal going from the 8451 and the data coming back from the three sensors. Maxim Semionductor has an application note that does exactly that. Look on the web for their App Note 85.

When you read the motion data, you'll be reading from the same registers of the three sensors and so therfore you'll be able to send the register address on the common MOSI and clock with SCLK.

Now,  set up the DIO port as input and perform a port read. You'll be capturing the motion data from the three 5020 simultaneously. You'll have to manage the accumulation of these bits, each DIO input associates with one of the sensors.

Again, depends on the speed and acceleration of your motion you may have to adjust the SCLK in order to capture all the motion data.

Hope this helps.

Regards,

New LV User 

Message 10 of 10
(7,202 Views)