BBb and I2C mux and 24256 external eeprom
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 2
- Joined: Mon Nov 18, 2013 4:09 pm
BBb and I2C mux and 24256 external eeprom
Hi, I have system were I have a 24256 I2C eeprom behind an i2c mux. Looking at the datasheet of the eeprom and the way we have it wired makes the I2C address 0xA:001X. It doesn't appear that your I2C library allows for addresses that high. I'm I miss understanding how to access the eeprom or is this a limitation of the python I2C library?
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: BBb and I2C mux and 24256 external eeprom
I2C addresses are almost always 7 bits long. If your EEPROM has address select pins, those add to the base address.
For a base address of 0x0A and address pin values of 0,0,1, the new device address would be 0x0A+0x01=0x0B.
For a base address of 0x0A and address pin values of 0,0,1, the new device address would be 0x0A+0x01=0x0B.
-
- Posts: 2
- Joined: Mon Nov 18, 2013 4:09 pm
Re: BBb and I2C mux and 24256 external eeprom
The upper byte is 1010 the lower byte is 001x (based on how we have it wired) where x is the read/write bit. Is there a code snippet of how to instantiate the I2C object to address an eeprom that lives at 0xA:001x? I've attached a snipped of the datasheet for clarity.
Thanks!
Thanks!
- Attachments
-
- eepromaddressing.PNG (18.35 KiB) Viewed 390 times
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: BBb and I2C mux and 24256 external eeprom
I2C addresses are traditionally shifted one bit to the right, so for the values you've listed the address will be 0x51. That will get shifted one bit to the left when the read/write bit is added, putting all the bits in the correct positions.
Please be positive and constructive with your questions and comments.