I2C SPI USB CAN eSPI Cable Testing View All Videos Quick Start Guides Software Downloads App Notes White Papers User Manuals Knowledge Base Sales Support About Us
Products Blog Sales Support Contact Search
What is the Fastest Time to send I2C Write and Read Operation with a Host Adapter?

Question from the Customer:

I am using the Aardvark IC2/SPI Host Adapter with the Control Center Software in I2C mode. At 400 kHz, I want to send a Write followed by a Repeated Start with a Read. When I observe the I2C traffic, there is a delay of at least 5ms between the Write and the Read. What is the least amount of time that this can occur between an I2C write and read operation? Here is the XML script that I am using:


<configure i2c="1" spi="0" gpio="1" tpower="0" pullups="1"/>

<i2c_bitrate khz="400"/>

<i2c_write addr="0x12" count="2" radix="16" nostop="1">00 20</i2c_write>

<i2c_read addr="0x12" count="1"/>


Response from Technical Support:

Thanks for your question! In general, the Aardvark adapter operates at 1 kHz - 800 kHz bitrate as an I2C master or an I2C slave.

Aardvark Host Adapter read-back data can be saved in CSV format. Figure 1: Aardvark I2C/SPI Host Adapter

These bitrates are only achievable within each individual byte and do not extend across bytes. It is not possible to send bytes at a throughput of exactly 1/8 times the bitrate. The I2C protocol requires that 9 bits are sent for every 8 bits of data. The byte throughputs are very close to the theoretical maximum byte throughput of the 1/9 bitrate.  About the delay that you see - there is a finite time required to set up a byte transmission.

The Aardvark adapter also has a 2ms round-trip latency for each Aardvark Software API function, which is caused by the full-speed USB link between your computer and the Aardvark adapter. The GUI and the operating system may add additional delay due to internal overhead, which cannot be changed. So, in conclusion, if you want to create your application, using the API would be your best bet in reducing the delays between write and read transactions. However, if you are simply sending these separate write/read transaction pairs, you can use the Master Register Read command in the Control Center software. This command uses the Aardvark hardware to send the read and write command in succession with almost no delay.

For more information about the I2C signaling characteristics, please refer to section 2.3 of the Aardvark I2C/SPI Host Adapter User Manual.

To meet your speed requirements, we recommend the PromiraTM Serial Platform. The advanced features include operating as an I2C master up to 1 MHz, integrated level shifting from 0.9V to 5.0V. and USB 2.0 / Ethernet connectivity for faster downloads, remote control, and factory floor automation.

Promira Serial Platform offers more features at higher speeds Figure 2: Promira Serial Platform

Regarding speed - the Promira platform supports the I2C master mode at 1 kHz to 1.02 MHz and the I2C slave mode at 1 kHz to 500 kHz. When using USB 2.0 connectivity, the Promira platform uses a high-speed USB link between the Promira platform and the computer, which reduces the USB latency from 2ms to about 250us. The Promira platform has also an API queuing mechanism that may provide additional speed-up for you. For additional information about I2C signaling characteristics, please refer to section 2.2 of the Promira Serial Platform User Manual and to section 5  for details about the Promira Software API. We provide Promira Aardvark Wrapper Software API, which enables you to use the Aardvark API with the Promira platform; however, to maximize the speed of the Promira platform, we recommend using the native Promira API.

We hope this answers your questions. If you have other questions about our host adapters or other Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.