LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-8451 600us delays between reads and writes

Hi, I am using a USB-8451 to communicate with an LIS3DH accelerometer in I2C mode.  I am reading the six output registers continuously, but am finding that on the oscilloscope there is a 600-1200us delay between writing (telling it which register to start at) and reading the data back.  There is the same delay between the end of the read data and the new write (to start back at the original address again).

I have seen mention of 10-20us delays in the forums, but nothing like this.  I am using Win7 32-bit, and LV2012.

Can someone help?  I want to read from this device at the maximum rate possible (knowing there is a 250kHz limitation on the USB-8451 for I2C).

Thanks!

0 Kudos
Message 1 of 14
(3,614 Views)

Just attaching a new vi - the Address was hidden by the While loop. 🙂

0 Kudos
Message 2 of 14
(3,613 Views)

What version of NI 845x driver are you using?


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 14
(3,608 Views)

I am using 2.1.2.

 

0 Kudos
Message 4 of 14
(3,604 Views)

Try going back to 2.1.1

 

I have recient experience with this driver (LV2012 and 845x 2.1.1) and did not see this behavior.  I do not have the driver or hardware available on this machine.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 14
(3,598 Views)

Hi, I have rolled back to 2.1.1 and see the same thing. 

0 Kudos
Message 6 of 14
(3,581 Views)

Hi Bricko

 

Could you attach some screenshot of the oscilloscope data?

 

Is the computer running other process or applications at the same time?

 

Have you try to use some other I2C device? Does it have the same delay, I want to discard that the delay is on the software side or hardware.

 

Regards

Esteban R.

0 Kudos
Message 7 of 14
(3,560 Views)

Thanks, Esteban.

 

I am still trying to get a screen capture - I've gotten busy with other things at the moment.

I tried shutting down all non-essential processes in the host PC - it didn't make any difference.  I also bought a USB-8452, and it does the same thing.  The delay is immediately before the start/restart bit.  I will also try another I2C device.

 

Thanks again,

Brian

0 Kudos
Message 8 of 14
(3,533 Views)

Here is a screen capture of writing to a different device than teh original - so it's not device specific. 

It can clearly be seen that I Write address 44, register 80.  Then I Read address 45, with data following (this device is an AD7998).

What I don't understand is the huge gap between the write and read.  The gap is the same whether I am using 100kHz or 400kHz mode.

Download All
0 Kudos
Message 9 of 14
(3,508 Views)

Hi Bricko

 

Could you tell me which signal is the blue one and which signal is the yellow one? I think that the blue one is the SCL, am I mistaken?

 

Have you benchmark your code in order to know the time that it takes LabVIEW to iterate the while loop? 

 

We need to keep in mind that windows is not a deterministic operating system and that we are sending the command from the software, USB port, hardware and then hardware into the device. 

 

I will try to reproduce the issue with an 8451 and I will let you know my result.

 

Regards

Esteban R.

0 Kudos
Message 10 of 14
(3,471 Views)