I'm working with a device that reads and writes to an eeprom via I2C. It automatically uses a starting address at the bottom (beginning) and I cannot change this. But this device uses a fairly small amount of space compared to common eeproms these days. I would like to introduce a system of alternate options("presets", "programs" or "spaces" if you will) using a hardware switch.

Is there a shift register type of device that can cause the addressing of the eeprom to shift up by a specified amount such that the master device will think it is reading from address 0 but is actually reading from a much higher address (a different address space of the eeprom that does not overlap)? I would need this shifting to be controlled by my hardware switch and I want at least 5 different "address spaces" to be possible. If I understand correctly, this is kind of the opposite of an I2C mux.

Update: To help clarify the question (although Duskwuff understood and provided a useful suggestion): The main device reads initialization data from an eeprom when it starts up. Very simple setup. It just starts reading at 0. I wanted to create a system of startup presets for this device such that a multiple position switch of some sort would allow the user to select which startup preset would be active. But I was hoping to do this without using a separate micro-controller and/or multiple eeprom chips. The question was about whether there is an obscure (or not so obscure) chip on the market that can "translate" the address of the read (or write) 'I2C transaction' in order to map them to a different space in a single eeprom. Board space is one consideration for why I was looking for such a thing. It appears that the answer is "no". Although if I can find a micro with enough internal memory I might be able to use it as a one chip solution (as mentioned in the other aswer and commments). So far, I haven't found a suitable micro but the project is back-burnered anyway.


closed as unclear what you're asking by pipe, Voltage Spike, Wesley Lee, ThreePhaseEel, JonRB Mar 12 '17 at 20:22

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ You are talking about a device on the I2C bus which will receive the command bytes from the master and rewrite them on the way to the slave. This is very specialized and I doubt a pre-manufactured device exists. However, it could be done with a sufficiently fast microcontroller. Any idea how fast your device runs the SCL clock? \$\endgroup\$ – DoxyLover Mar 8 '17 at 23:15
  • 3
    \$\begingroup\$ @DoxyLover why put a "sufficiently fast" microcontroller as "proxy" between the controller reading the EEPROM and the EEPROM, if the same microcontroller could even easier emulate an EEPROM itself? If the master adheres to I²C spec, a slave can stretch the clock for as long as it wants to complete its operation... \$\endgroup\$ – Marcus Müller Mar 8 '17 at 23:19
  • \$\begingroup\$ @MarcusMüller Very good point \$\endgroup\$ – DoxyLover Mar 9 '17 at 1:19
  • 1
    \$\begingroup\$ I was hoping to avoid the complexity of adding a microcontroller to the project. But the idea that the uC could actually contain enough eeprom space for this is an interesting observation. \$\endgroup\$ – chmedly Mar 9 '17 at 18:31

Continuing from what Marcus already raised in the comments, you could likely use an ATTiny85 or even an ATMega328 to emulate multiple small to medium sized EEproms. There is code readily available in Arduino land for reading and writing to program memory which in an ATMega328 would give you perhaps 28k * 8 without having to resort to external EEprom for your emulation device. The only point to be aware of is that the program flash is only rated for 10k erase write cycles whereas an EEprom would be rated for 100k - 500k cycles. If you are just reading from your EEprom, this wouldn't be an issue of course.
You have plenty of pins to allow selecting pages of EEprom to serve up on the I2C bus and the code for an I2C slave for the AVR is again readily available .

I'd suggest you could implement this on a small processor such as the Digispark Pro (ATTiny85 based) and get about 6k of storage, and 28k on the Arduino Nano and both could be powered by the EEprom socket. Both processors support USB so you could easily move EEprom pages to and from the device.


I've heard of some unusual parts, like the Linear Technology LTC4317, which can translate the I2C address of a device, but I've never seen a device which will attempt to alter the contents of an I2C transaction -- like the address of an EEPROM read/write operation.

Your best bet is probably to attach multiple EEPROMs and come up with some way to disable the unwanted ones. For instance, you could use the address pins to move the inactive EEPROMs to a different address from the active one.

  • \$\begingroup\$ I was planning to simply switch the SDA line between separate eeproms as a 2nd best option but using the address pins like you suggest is probably a much better way to do it. \$\endgroup\$ – chmedly Mar 9 '17 at 18:26
  • \$\begingroup\$ If you were going to switch one of those lines, you'd be better off switching SCL. Leaving SDA high or floating while SCL is still pulsing could put the EEPROM into a weird state. \$\endgroup\$ – duskwuff Mar 9 '17 at 18:30
  • \$\begingroup\$ Good point! But switching one of the address lines low with the multi-position switch sounds like smartest idea. The switch can be remotely located without much concern for the capacitance/isolation like I would have using a clock or data line. Thanks! \$\endgroup\$ – chmedly Mar 9 '17 at 18:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.