Time Delay when working with an I2C protocol in LabWindows/CVI

Updated Jan 20, 2023

Reported In

Hardware

  • USB-8452

Software

  • LabWindows/CVI

Issue Details

I am working with an I2C protocol using NI 8452 and CVI Instructions. I have capture the data and CLK signal with an scope and I see I a time delay, almost quart of cycle, between SDA and SCL, is it possible to short that delay or delete it?

Solution

Clock rate in I2C is a maximum clock rate rather than a set speed. There's various factors that could make our data transmission slower. As I2C is generally not a high-speed or high-throughput protocol, this is fine for normal operation.
This delay is likely caused by the USB bus itself. Data transfer across the bus, along with Windows jitter, are going to eat into I2C timing for a USB device, while the Raspberry Pi device has its own controller onboard and does not have to deal with the same latency. The timing depends on what the OS is doing at the time, latency of the USB bus, among other things.
If it's important for this delay to be eliminated, it might be best to avoid USB devices in general.