I just asked this question trying to find out if having a powered I2C slave in an ISP bus during MCU (Attiny) programming would be problematic. Apparently it would, so I need to isolate the slave(s) from the bus temporarily.
I can't just power down the slave(MPU-6050) because its inputs are not tolerant to 3.3V when its Vcc=0V.
I also found this interesting related question, but the solutions proposed do not work for me (I have limited board space and specific ICs availability are a problem for me for this projects budget).
I'm really trying to steer away from a jumper/DIP switch solution so I'm considering active ones. Here it goes:
Use a discrete bi-directional level shifter
But instead of a High and Low voltage side, I'd try something like this:
When Attiny is programming, its outputs are high-impedance, R5 turns M3 off. C1 is mainly to prevent glitches on the pin from turning M3 back on again.
R7 then turns M1 and M2 off, and SCK/MOSI can "bounce" freely without disturbing the I2C slave(s).
Upon booting, the Attiny turns M3 on, providing power to the I2C bus.
Would this work? Am I overlooking or overcomplicating something?