What Tools are Available for Programming I2C and SPI EEPROMs?

Question from the Customer:

We have the Aardvark I2C/SPI Host Adapter  for programming EEPROMs. We are trying to use Python to read and write the EEPROM data, but with our software, the Aardvark adapter keeps writing 0s to the target devices, not the data that we programmed. What can we do to understand and fix the problem? Also, are there any guidelines for programming with the Aardvark adapter?

Response from Technical Support:

Thanks for your questions! We have two recommendations for you – checking your setup with Control Center Serial Software and using our Aardvark Software API for your final setup. Our API software works with several programming languages, including Python 2 and Python 3.

Check Your Setup for Programming EEPROM Devices

With a simple interface, you can test your data and monitor your programming results. The Control Center Serial Software provides the convenience of using batch scripts, as well as controlling the Aardvark adapter. With this software, you can quickly connect to the target  I2C or SPI system and issue read and write commands, allowing you to test and verify your setup. You can observe and analyze the results after executing each command. Here is a video that shows an example using Control Center Serial Software and a batch script with the Aardvark adapter.

Take a look at our Knowledge Base, which provides information and more examples for memory programming.

Using API for Custom and Continuous Operations

When your setup is ready, you can easily use or modify our APIs for programming your EEPROMs, as well as writing your own scripts. Here is a list of the functional examples that come with the Aardvark Software API:

  • aadetect: Detect Aardvark devices attached to the system.
  • aalights: Flash LEDs attached to a Philips PCA9554D I/O port expander as found on the Activity Board.
  • aai2c_eeprom: Read from or write to an I2C serial EEPROM, such as the Atmel AT24C02 on the Activity Board.
  • aaspi_eeprom: Read from or write to an SPI serial EEPROM, such as the Atmel AT25080A found on the I2C/SPI Activity Board.
  • aai2c_file, aai2c_slave: Use the I2C slave functionality of the Aardvark device. This example requires two Aardvark devices. Run aai2c_slave with the first Aardvark device to wait for a new slave transmission. In another shell, run aai2c_file to transmit a binary file with the second Aardvark device.
  • aaspi_file, aaspi_slave: Use the SPI slave functionality of the Aardvark device. This example requires two Aardvark devices. Run aaspi_slave with the first Aardvark device to wait for a new slave transmission. In another shell, run aaspi_file to transmit a binary file with the second Aardvark device.
  • aagpio: Perform simple GPIO tests with a single Aardvark adapter. The results can be verified using an oscilloscope or multimeter.
  • aamonitor: Use the I2C Bus Monitor feature. This example can be run on one Aardvark while using a second Aardvark to communicate with the I2C EEPROM on the I2C/SPI Activity Board (see aai2c_eeprom). The first Aardvark will monitor the traffic between the second Aardvark and the EEPROM.

Our Knowledge Base includes examples and tips about using Total Phase Software API, which you can download for free. For details about API commands, please see the API Documentation section of the Aardvark I2C/SPI Host Adapter User Manual.

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.