ATtiny841 MISO/MOSI/SCK coexisting with SDA/SCL

Is this possible? The ATtiny841 datasheet reports that PA6 has both MOSI and SDA, and that PA4 shares both SCK and SCL. Is there anything I should be worried about when using the SDA and SCL lines? Does using them as such prevent the serial programmer from working?
Thank you,

I have a few ATtiny841s but have not used them yet. I do use both the ATtiny84 and 85 though. They all have the same combination of signals on the same pin.

I have an UNO as ISP, an I2C LCD display and a second ATtiny84 running as an I2C slave all connected at the same time. I upload a sketch via ISP and then simply control the slave I2C processor while displaying program output and debugging information on the LCD. All connected at the same time and all working fine.

Hope that helps.


This is an isdue for almost every part in the attiny line, since most of them use a USI for both spi and i2c, on the same pins as isp programming.


Put a , say, 220 ohm resistor between the attiny pin and all the i2c stuff. This is what Atmel suggested when connected devices interfere with isp programming - that resistor insures that whatever the i2c devices try to do in response to the stuff going on, the programmer will be able to overpower them. Works for spi too.

Use the serial bootloader (optiboot) to upload sketches instead of isp (tjis is what i do on the tinies with serial ports, i havent built anything where this was an issue since adding serial bootloaders for the rest of the tinies). This is included with ATTinyCore, see the core documentation.

Disconnect the I2C devices while programming

As i think about this, i cant actually recall ever havinv a problem with this sort of thing.