After seeing the code and Logic analyzer waveform, there are some issue configuration in the code while use U8g2lib library. Please help here solve this issue
Also I asked help from library owner in github but I didn’t got the solution
Logic analyzers are a life saver!! This may or may not help but I developed an esp-idf component for the SSD1306. It is minimalistic i.e. one font type, works with either display i.e. 128x32 or 128x64, it is an updated code base that supports i2c_master.h for I2C transactions.
Thanks for the sharing details. Since I am intermediate level programmer going too much deep to edit the library code I will difficult for me. If any pre library made which support non i2c pin will easier to implement.
Adafruit SSD1306
SSD1306ASCII
U8g2
For this use case, I tried all this library but U8g2 library only show bus activity, rest of library didn’t working at all.
Non-standard? If I read the datasheet correctly of the STM32F103xB, then PA3 and PA4 are not hardware I2C pins at all. Not even with a remap would an I2C peripheral be connected to those pins.
The occasional glitches on the SCL (?) line in the logic analyzer definitely don’t look good. If the SoftWire library is what’s causing that, that needs to be fixed.
This SCL line glitches is come only if I use the U8g2 library. With Softwire library it is working fine without glitches (by running the I2C scanner example).
I tried the code prepared by you. Straight away display start working, attached image. Thanks you so much for your support and help🙌.
Update the code as per your suggestion &
Add extra lines of code to test the complete display area
oled.setTextXY(3, 2); // Set cursor position, line 3
oled.putString("Hello");
oled.setTextXY(4, 20); // Set cursor position, line 4
oled.putString("World!!!");
oled.setTextXY(5, 10); // Set cursor position, line 5
oled.putString("123");
oled.setTextXY(6, 1); // Set cursor position, line 6
oled.putString("Testing via");
oled.setTextXY(7, 5); // Set cursor position, line 7
oled.putString("Sofwire");
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ PA4, /* data=*/ PA3, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display