EEPROM (Electrically Erasable Programmable Read Only Memory) is available at Mouser Electronics from industry leading manufacturers. Mouser is an. Electronic Manufacturer, Part no, Datasheet, Electronics Description. STMicroelectronics, M24MA, Automotive 1-Mbit serial IC bus EEPROM with 1 MHz. The Atmel® AT24CM01 provides 1,, bits of Serial Electrically Erasable and. Programmable Read-Only Memory (EEPROM) organized.
|Published (Last):||21 January 2011|
|PDF File Size:||13.64 Mb|
|ePub File Size:||2.26 Mb|
|Price:||Free* [*Free Regsitration Required]|
Stephen was having problems with the read method not returning the data he had written using the write method.
24M01 Datasheet, PDF – Alldatasheet
Contributing to the unknown, Stephen was using the Atmel ATtiny85 chip, where my library had only ever been successfully tested on the Arduino Uno and Mega boards. In the end, I was able to correct my library and fully document everything in the process, so I thought it was worth a detailed blog posting generally around the subject of interfacing to the memory I2C, SPI, etcand some guidance on how to choose the right memory type and physical interface for a given application.
As a follow-on post, I will discuss different types of interfaces and different types of physical memory as it relates to speed and suitability for various applications. The library in question was written for the ST Micro M24M01, however, it can also be used with most variants of this chip i.
Admittedly, as it existed in my github repository, it lacked proper code documentation in the comments that otherwise could have helped Stephen work through the issues and possibly debug the problem himself.
In the process of conducting some investigative debugging, I found out the problem was due to a bug in my code which in turn was manifested as a result of a change in the Arduino Wire library in how the Wire library handles a repeated start condition on the I2C bus.
Breaking the problem down, I had to separate two potential issues: It actually turned out the be a combination of the two.
Interfacing with I2C EEPROM
As I knew I had used this library on an Arduino Uno before in the past, and it worked, I decided to start from there. I grabbed an Arduino Uno and started troubleshooting. Now, there are a few caveats with the above process depending on whether you are reading or writing from the chip and, if writing, the type of write operation being performed.
As noted in the datasheet, a read or write operation is terminated by sending a stop condition on the I2C bus. Therefore, a repeated start condition is needed to keep esprom bus active after the memory address bytes have been sent before proceeding to send the data to write or clocking out data being read.
This can be a few or several milliseconds for each write, regardless of whether you are writing one byte or a full page of bytes. Not only do you have the I2C bus communication overhead associated with each write operation, but you must wait for N-milliseconds after each write to ensure the EEPROM chip is ready to accept the next write operation.
There are at least a couple of popular methods of addressing write timing and can marginally improve write access speeds. The simple timer delay method is just as it sounds, whereby a simple dead timer delay can be used to wait N-milliseconds, plus some room for margin, for the write operation to complete before continuing with another write operation.
The device polling method is the most efficient, as it simply repeatedly polls the EEPROM chip until the chip stops responding with a busy status.
You can find more information on these methods and their optional parameters here. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data 24j01 processed. If no memory address sent during a read operation, then data is read starting from the current address pointed to by the address pointer. Send the data to write to the chip, or clock out the data you want to read from the chip Now, there are a few caveats with the above process depending on whether you are reading or writing from the chip and, if writing, the eeprlm of write operation being performed.
Byte Write Writes only one byte of data Memory address must be 42m01 to set the memory address pointer Uses the most I2C bus communication overhead due to the Device Select command, two memory address bytes, followed by the data bytes to be written.
Memory address must be sent to set the memory eepromm pointer Uses least amount of I2C bus communication overhead since the Device Select command and memory address bytes must only be sent once followed by N-number of bytes. Reading past the end of the last address of the entire chip will wrap around and start reading 24m001 address 0x00 again. Memory address must be sent to set the memory address pointer Uses next to least amount of I2C bus communication overhead As noted in the datasheet, a read or write operation is terminated by sending a stop condition on the I2C bus.
Methods of Addressing Write Timing There are at least a couple of popular methods of addressing write timing and can marginally improve write access speeds. Simple Timer Delay The simple timer delay method is just as it sounds, whereby a simple dead timer delay can be used to wait N-milliseconds, plus some room for margin, for the write operation to complete before continuing with another write operation.
Device Polling The device polling 24mm01 is the most efficient, as it simply repeatedly polls the EEPROM chip until the chip stops responding with a busy status. Leave a comment Cancel reply Your email address will not be published.