Conflict between RTC and SSD1306 OLED

If I install a data logging shield or separate data logging module on a breadboard with a Nano and 0.96" SSD1306 OLED, I can run code that sets the RTC. But if I then try to run code that does nothing more than display the date and time on these OLEDs I get just "junk" values for the date and time. If I set the RTC and then write code for a system without an OLED, just to display the date and time in the serial port window, then everything is OK.

I've asked about this before, but I have not yet received any explanation for this issue and, hopefully, how to fix it. Please help!

Ok, so there are 3 devices coming into play here: 1 - SSD1306 OLED which is an SPI device. 2 - unknown RTC - probably I2C. 3 - SD card on the data logger - SPI device.

One might perhaps suspect a conflict between the SD card and the SSD1306 or perhaps something amiss with the use of the CS signals to select and read each SPI device, but without seeing your the code it is impossible to comment. Could you state which RTC you are using and either post your code or perhaps a link to the previous post?

If you are using a DS1307 RTC, the maximum speed is 100KHz, so you will need to limit the SSD1306 to that if you are using a display with an I2C interface.

Interesting, post an annotated schematic showing how you have wired this.

perhaps I missed it but what is the host microcontroller? Uno, Mega, Nano, ESP32, RP2040, ???

there can be problems when devices share SPI with SD card readers

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.