0

I am working on a project where I need to communicate my slave device EEPROM (Slave address as 0x54). But when I gave the i2cdetect -r -y 10 command it shows 8 different addresses for single hardware. I had configured the hardware by device addressing for 0x54. But it shows 0x50 to 0x57. Can anyone suggest the reason for this behavior?

$ sudo i2cdetect -r -y 10
...
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --
0andriy
  • 4,183
  • 1
  • 24
  • 37
chandru
  • 1
  • 1

1 Answers1

0

I2C protocol allows to address only 7 or 10 bits. The default (and mostly used) is 7-bit address. It means the first byte has address and R/W bit. Now, each I2C address can have an actual address in the EEPROM, which is 8-bit, it means that the addressable length is 256 bytes (this is done this way most likely in order to simplify hardware part a lot). Hence we have 256 bytes and this is what can be maximum memory size on the bus for a single I2C device. That's why the idea was to address the bigger EEPROMs and represent them as several addresses on I2C bus. So, each address is for 256 bytes of memory. For your case it has 8 addresses and the size of the EEPROM is most likely 2 Kbytes.

This is described in the chapter 3.6 Device Addressing of the EEPROM datasheet.

In the very same datasheet, the TABLE 8-1: PIN FUNCTION TABLE explains why you have not succeeded in moving it to another address (TL;DR: pins are not connected).

0andriy
  • 4,183
  • 1
  • 24
  • 37
  • Hi Oandriy, As you mentioned, each slave address is to access each block of memory. But here, when I write one byte of data for starting memory 0x00 of data 0x66 to 0x54 slave address, I can read the same data from the same memory location from all other addresses. How is it possible?. For kind information that I am using only 2kilobit(256 bytes) eeprom. I can able write all 256 bytes using a single slave address through i2cset command. – chandru Jun 24 '22 at 07:39
  • Add a link to a Datasheet of the eeprom you are using. – 0andriy Jun 27 '22 at 21:52