Problem I2C mega master to uno slave

I have run into a ‘hang’ problem using the Wire.h library with a Mega acting as an I2C Master talking to a UNO I2C Slave.

All works fine UNLESS the UNO is unpowered. I was looking for some kind of error checking that would tell me the Slave was not there.

I tried the conventional I2C address scanning code, and it too hung when the UNO was unpowered. (When powered all was fine and the slave address was found).

Is this somehow due to the unpowered UNO effecting the SCL/SDA lines? I know the Mega has pullups on those lines but I tried to add external 5K pullups - no difference.

Fred Miller

I would expect the diodes that clamp the IO pins to +0.5V of VCC and -0.5 of Gnd would impact the I2C signals when the Uno is not powered.