olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.05k stars 1.04k forks source link

OLED - SH1106 display malfunctions #2500

Open FurqanChaudhary opened 3 weeks ago

FurqanChaudhary commented 3 weeks ago

Hello, I have been working on a project that involves two OLED displays, both of the SH1106 type. One display has the I2C address 0x3C, and the other has 0x3D and both are connected to the same I2C line. Both displays function perfectly, but after a random period, the information on one of the displays becomes corrupted or misplaced, while the other continues to work correctly. The issue occurs unpredictably—sometimes within 5 minutes, while other times it may not happen for over 24 hours. Could you please suggest what might be causing this problem?" please see attached photos

bad good

olikraus commented 3 weeks ago

Each display contains some bytes of configuration RAM. It seems that the RAM content might get corrupted after a while, especially if the power supply is not stable. Ideas:

FurqanChaudhary commented 3 weeks ago

I am powering both OLED displays with a battery, so I believe the power supply is stable and shouldn't be the issue. Regarding capacitors, I’ve tried using various values, but unfortunately, they didn’t make any difference. I also experimented with calling the u8g2.begin function every 5 minutes, but that caused the display to reset, where the screen goes blank ,before the information reappears. However, this doesn’t look ideal as it feels like the system is rebooting. Could you suggest any other solutions?