I’m working on automating the programming of a Microchip 24LC128 I2C EEPROM. I’m using the Aardvark I2C/SPI Host Adapter with the Aardvark Software API, specifically Python. Looking at aai2c_eeprom.py, how do I specify the start location for writing? The slave address is 0x50.
What would be the correct syntax for the command? I think it would look like this:
But so far, I haven’t been able to get the program to work with my chip. Any suggestions?
Response from Technical Support:Thanks for you question! The functional examples that Total Phase provides with the API software package are to read, program, and erase two specific devices: AT25080A SPI EEPROM and AT24C02 I2C EEPROM, which are installed on our I2C/SPI Activity Board.
Our API examples can be used as a baseline for building the code that you need for your chipsets. As specifications vary per chip design, these example programs may not work for other devices, but the programs can be modified as needed.
In this case, erasing data is implemented by writing “0” in the specified length of bytes.
Looking at the datasheets, the memory of the 24LC128 EEPROM is larger than the memory of the AT24C02 EEPROM, which affects the memory address range. To work with your device, the parameters related to the address range should be modified in the example code.
The start location can be specified in the OFFSET argument of the command line function. To read only a single memory location, specify the LENGTH as 1.
For more information about API commands, please refer to the API Documentation chapter of the Aardvark I2C/SPI Host Adapter User Manual.
In addition to API programs, you can use XML batch files with the Control Center Serial Software. We regularly update batch scripts for production devices. As you know, new products are constantly released and prototypes are tested before release – we may not have exactly what is needed. However, like the API files, the XML files can be easily modified, and then run with the Control Center Serial Software. For an example of using batch files, take a look at this video:
Additional resources that you may find helpful include the following:
We hope this answers your question. Need more information? You can contact us and request a demo that applies to your application, as well as ask about our Total Phase products.