I'm designing a board in which an Attiny85 is connected to an accelerometer (MPU-6050) via I2C.

The I2C pins are in the ISP bus (SDA/MOSI, SCL/SCK). I wonder what happens to the accelerometer during programming of the MCU?

Are there any best practices I should follow? I considered just adding some solder jumpers, but I wonder if any precaution is even necessary.

enter image description here

enter image description here


After finding out this is problematic, I'll try a solution based on Bruce Abbotts answer in another question.


The MPU-6050 may prevent you from programming the ATTiny successfully. It would interpret the ISP data as I²C and react accordingly. Expect interesting behaviuor on both SCL and SDA lines.

During programming the SCL and SDA should be disconnected from the Tiny MCU, e.g. by jumpers or dip switches.

  • \$\begingroup\$ Hmm, since during programming RST is pulled low, do you think it would be enough to just turn off the MPU? (i.e. with a couple FETs and RC filters to filter the pulse after chip erase) \$\endgroup\$ – Wesley Lee Sep 16 '16 at 19:58
  • \$\begingroup\$ RST is not wired up to the MPU in any way. And check the datasheet on the allowed voltages on SDA/SCL lines with respect to VCC in case you just wanted to cut the power. \$\endgroup\$ – Turbo J Sep 16 '16 at 20:05
  • \$\begingroup\$ I meant using RST to control FETs cutting power to the MPU. But thats another question altogether. I might just use a pin in the Tiny to do that instead. \$\endgroup\$ – Wesley Lee Sep 16 '16 at 20:07
  • \$\begingroup\$ Datasheet chapter 6.9 disallows that. Input voltages on SDA,SCL must not be bigger than VCC + 0.5 V. That includes the case when VCC= 0V aka powered off. In practise you will reverse power the chip, giving you even more interesting behaviour. \$\endgroup\$ – Turbo J Sep 16 '16 at 20:12
  • \$\begingroup\$ Thanks a lot for looking that up. I guess I'll have to find another method. \$\endgroup\$ – Wesley Lee Sep 16 '16 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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