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 use a Host Adapter or a Protocol Analyzer to Continuously Read-Back I2C Data and Save as a CSV File?

Question from the Customer:

We are testing an I2C device. To record the points in time when values change, we are looking for a way to continuously read back a register, which we have not accomplished with a logic analyzer. Here’s what we want to do:

  • Continuously read-back I2C for the time period that we specify.
  • Retrieve those read-back values as a CSV file.

What are your recommendations?

Response from Support:

Thanks for your questions! There are two possibilities. If you only need to monitor the device over the I2C bus, we recommend the Beagle I2C/SPI Protocol Analyzer. If you need to write to and read from the I2C device, we recommend the Aardvark I2C/SPI Host Adapter. For both devices, Total Phase provides a Software API that you can use to write your own applications customized for your test requirements. The API comes with support for multiple OS (Windows, Linux, and Mac) and multiple languages (C, Python, Visual Basic, and C#).

The Beagle I2C/SPI Protocol Analyzer can be used for read-back and saving data in CSV format. Figure 1: Beagle I2C/SPI Protocol Analyzer
Monitoring the I2C Device with the Beagle I2C/SPI Protocol Analyzer:

The Beagle I2C/SPI Protocol Analyzer is a non-intrusive device that monitors the I2C bus up to the rate of 4MHz, and can be used with the Data Center Software or Beagle Software API. These software applications are free and can be downloaded.

  • Regarding your test setup, you can use the Beagle analyzer with the Data Center Software to capture the I2C data to the memory, and display it in the Data Center transaction log. After the stopping the capture, you can save the transaction log data to the default tdc file or export the data to a CSV file.
  • The Data Center Software transaction log displays the time that each transaction occurs in the timestamp column. Examples are provided in the Data Center Software.
  • You can use the Beagle API Software to capture I2C data, and then manipulate and save the data based on your system requirements and test specifications. The Beagle API Software is provided with software examples that you can use and customize for your test setup.
Aardvark Host Adapter read-back data can be saved in CSV format. Figure 1: Aardvark I2C/SPI Host Adapter
Actively Communicating with the I2C Device with the Aardvark IC2/SPI Host Adapter:

The Aardvark I2C/SPI Host Adapter actively communicates on the I2C bus, as well as performs I2C write and read operations. The Aardvark adapter supports I2C up to 800 KHz, and supports: Flash Center Software, Control Center Software, and Aardvark Software API.

  • Regarding your test setup, when the Aardvark adapter is configured as an I2C master and used with the Control Center Software, manual read and write operations can be performed. Additional information about these operations, please refer to steps 1-12 of the knowledge base article Programing I2C EEPROM Using Aardvark Adapter, Level Shifter Board and Control Center.
  • With the Control Center Software, you can store the I2C transaction log to a CSV file. For additional information about the Control Center Software and CSV files, please refer to section 3.2.4 of the Control Center Software User Manual.
  • With the Aardvark API Software, you can create programs for your system requirements and test specifications. The Aardvark API Software is provided with software examples that you can use and customize for your test setup.
  • The Flash Center Software package allows you to quickly erase, program, and verify I2C- and SPI-based EEPROM and Flash memory chips. The Flash Center Software application is written with standard Aardvark APIs that can be downloaded.