i2c interfenence DS3232RTC & OLED 1.3" SH1106

I have an Uno using a RTC and to display data on an OLED. Works perfectly, I drive the OLED from a digital output pin and the RTC from the 5v.

I need to turn the OLED display off and I drop the digital pin low, display turns off (as required) BUT the RTC stops too. I have used serial.print to the monitor this issue and the clock input stops incrementing when the display turns off.

Has anyone had this problem and solved it?

Thanks in advance ... Peter

If your OLED has pullups on the i2c bus signals then when you set the power signal to ground those pullups are now pull downs which would make the i2c bus no longer work.

I'd change the power pin to an input vs setting it to ground.

How much power does the OLED use?
Is it more than what an Arduino pin is rated to provide?

--- bill

I had pullups and tried it, I removed them when nothing changed (I think the RTC has them built in).

The OLED display is 0.08w.

I have looked through the microLCD.h file and I see a reference to DISPLAYOFF and DISPLAYON and if I use these commands, the sketch compiles, but nothing happens to the display.

Hope this helps ... Peter

Solved in software ...

if (second()== 50)
{
Wire.beginTransmission(0x3C); // might be different for your display
Wire.write(0x80);
Wire.write(0xAE);
Wire.endTransmission(); // stop transmitting
}
if (second() == 59)
{
Wire.beginTransmission(0x3C); // might be different for your display
Wire.write(0x80);
Wire.write(0xAF);
Wire.endTransmission(); // stop transmitting
}

This knocks the display out for 4 seconds.

PRM056:
(I think the RTC has them built in).

Guessing is not good.
The data sheet for the 3232 is easy to find. The diagram on the first page "Typical Operating Circuit" shows where the pullups are.

--- bill