10-08-2013 12:08 PM
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!
10-08-2013 12:16 PM
Just attaching a new vi - the Address was hidden by the While loop. 🙂
10-08-2013 12:36 PM
What version of NI 845x driver are you using?
10-08-2013 12:42 PM
I am using 2.1.2.
10-08-2013 01:04 PM
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.
10-08-2013 03:37 PM
Hi, I have rolled back to 2.1.1 and see the same thing.
10-09-2013 03:13 PM
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.
10-19-2013 08:30 AM
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
10-21-2013 05:31 PM
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.
10-22-2013 06:08 PM
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.