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
How Can I Set Up the I2C/SPI Host Adapter for Synchronous I2C Reads from Two Separate I2C-to-CEC Translators?
Rena

Question from the Customer:

We are using the Aardvark I2C/SPI Host Adapter and the GPIO to test our prototype I2C-to-CEC Translators. These prototype boards are connected together, and each one is connected to an I2C master. The first board receives a few bytes over I2C (the first Aardvark adapter writes the data) and translates them to CEC format. The second board receives the CEC encoded byte stream and translates it back to an I2C stream (the second Aardvark reads the data).

The first board receives the I2C bytes correctly. Our difficulty is reading the I2C bytes from the second board, as we do not know exactly when the I2C data is available in the second board. We use batch mode I2C reads with delays, but we miss many I2C bytes.

How can we use I2C reads without missing any data from the second Board? How can we synchronize I2C reads when the data is generated on the second board?

More details about the setup:

  • The delay between the time that the first I2C-to-CEC Translator reads the I2C data from the first Aardvark adapter until the second I2C-to-CEC Translator is ready to send the I2C data to the second Aardvark adapter is 120 milliseconds.
  • The delay for the first translation cycle is 124.5 milliseconds, followed by a delay of 120 milliseconds for the following translation cycles.
  • The second I2C-to-CEC Translator has an LED that indicates when it is ready to send the I2C data to the second Aardvark adapter.
  • The I2C in both translators are interrupt driven. The main Processor sets up the I2C slave with the data buffers to be received or sent on I2C (first and second translators respectively) and proceeds to run other tasks. When the I2C master on the Aardvark adapter provides the clock, the data gets written or read, respectively.
Response from Technical Support:

Thanks for your question! The Aardvark adapter is definitely the right device for what you are trying to accomplish. With its I2C master capabilities and four GPIO signals, and the flexible and customizable Aardvark Software API, you can make sure that all the data is being read by using the GPIO lines on the second Aardvark adapter to synchronize with the second I2C-to-CEC board.

Aardvark I2C/SPI Host Adapter Figure 1: Aardvark I2C/SPI Host Adapter

Here are the guidelines for synchronous I2C reads:

  • Connect a GPIO signal from the second Aardvark adapter to the hardware of the indication signal in the second I2C-to-CEC Translator.
  • When the second I2C-to-CEC Translator is ready to send the I2C data to the second Aardvark adapter. If the I2C-to-CEC Translator can generate a hardware signal indicator to the second Aardvark adapter, then you can write program using the Aardvark API to generate the read operation to the second Aardvark adapter for reading data from the second I2C-to-CEC Translator.

Alternatively, the PromiraTM Serial Platform, would be an ideal tool to support your system requirements with even more capabilities. Compared to the Aardvark adapter, it has shorter USB and Ethernet delays between it and the host computer.

Promira Serial Platform Figure 2: Promira Serial Platform

A summary of the Promira platform features:

  • I2C master up to 1 MHz
  • A shorter delay between the host computer and the I2C adapter via USB or Ethernet
  • Integrated level shifting from 0.9V to 3.3V

The current release of the Promira platform supports I2C Active – Level 1 and SPI Active – Level 1 Applications. More features will be available as we release more software applications to drive the Promira platform.

Additional resources that you may find helpful include the following:

We hope this answers your question. 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.