Skip to main content
Visitor II
September 23, 2024
Question

How to differentiate the 4K and 8K EEPROM by software

  • September 23, 2024
  • 1 reply
  • 1175 views

I am using M24C08(1K), M24C16(2K) and M24C32(4K) along with this I am planning to use the M24C64(8K) eeprom.

How can we differentiate the 4K and 8K eeprom using software. I have implemented a logic to read last page of the eeprom. Let's say I am having the 4 variants of the eeprom's with me. I have started a loop and start reading the last of 8k initally if it gets sucess then I will return the size directly or else I will move further to check same with the 4K.

The above provided logic is working fine with 1K, 2K and 4K, but it is not working for the 4K and 8K. This is because the 4K eeprom MSB has 4 bit don't care. If try to read the address above the 4095 then it will read the data from the 4K eeprom itself.

so my question is that if we have a hardware of two variants with 4K and 8K then how can we find the size by using the software.

surendra_0-1727082087429.png

 

warm regards

surendra

 

    This topic has been closed for replies.

    1 reply

    Graduate II
    September 23, 2024

    You can store some identification string at location 0 of the device at the time of manufacturing, so that later you can use that to identify the device and then use the correct addressing mechanism to access the device.

    surendraAuthor
    Visitor II
    September 23, 2024

    1k, 2K and 4K eeprom's are already installed at site, so this solution is not feasible for us. We just want to detected the size of the eeprom based on the Flash id.

     

    Graduate II
    September 23, 2024

    Ok, if  you are ok for destructive method, you can try to write 0xA5 (known pattern to the last memory location and read it back. if it is written to the non-existing location, you will not get back the same value as written.