Page 3 of 4

Re: OLED SSD1306 I2C Address

Posted: Sat Jun 18, 2022 7:41 am
by jgu1
Hi all!

I report a bug for these tiny display In Fc9for a while ago. Do you have FC8, try to make a test in this SW work fine there, But not in FC9. ;)

viewtopic.php?f=3&t=790

Br Jorgen

Re: OLED SSD1306 I2C Address

Posted: Sat Jun 18, 2022 5:33 pm
by MJU20
I think it's a strange timing problem. And that could be the reason the display is updated very very slowly (like 1 minute to draw a small text on the display or clear the display).

These are screenshots from my logic analyser with several different settings for the I2C baud rate:

Baud rate in SSD1306 I2C properties = 100kHz
100khz.jpg
100khz.jpg (35.27 KiB) Viewed 2222 times
Baud rate in SSD1306 I2C properties = 400kHz
400khz.jpg
400khz.jpg (40.31 KiB) Viewed 2222 times
Baud rate in SSD1306 I2C properties = 1MHz
1Mhz.jpg
1Mhz.jpg (46.12 KiB) Viewed 2222 times
Even with a custom baudrate it keeps 490hz...

I hope that with this information Matrix can fix this problem really fast.

Re: OLED SSD1306 I2C Address

Posted: Sat Jun 18, 2022 6:48 pm
by MJU20
And this is with the Arduino/ESP32 library with Adafruit sketch..

This one works..

Re: OLED SSD1306 I2C Address

Posted: Sat Jun 18, 2022 8:52 pm
by jgu1
Hi MJU

Well spottet :D So I was rigth viewtopic.php?f=3&t=790

Have you testet in FC8 (Arduino) it works there

Jorgen

Re: OLED SSD1306 I2C Address

Posted: Sat Jun 18, 2022 11:57 pm
by MJU20
Not tested in FC8 because this project has to work with an ESP32 and that wasn't supported in this version.

BTW: I think this problem may occur in the SPI version too. I've tested the ESP with the SPI version of the SSD1306 and this also didn't work..

Re: OLED SSD1306 I2C Address

Posted: Mon Jun 20, 2022 10:23 am
by BenR
Hello,

With the I2C timing problem you've highlighted. Please can you confirm the target MCU you're using and also the I2C channel you're using and I'll investigate for you.

Re: OLED SSD1306 I2C Address

Posted: Mon Jun 20, 2022 2:55 pm
by MJU20
Thank you Ben,

I'm using an (NodeMCU) ESP-Wroom-32 (version 1.1).
The I2C channel I'm using is "software" on pin A21 (SDA) and A22 (SCL). (same as the Arduino sketch)

BTW: I2C Channel 1 in FC proposes pin B4 on the board (A36), but this is not available on the board.

Re: OLED SSD1306 I2C Address

Posted: Fri Jun 24, 2022 5:40 pm
by MJU20
:oops: any news on this one?

Re: OLED SSD1306 I2C Address

Posted: Fri Jun 24, 2022 7:00 pm
by LeighM
Using software aka bitbang I2C is very much a last resort on ESP32 due to it running an RTOS, hence timings can't be guaranteed and tend to stretch considerably.
Are there any hardware channel I2C remap pins that you can use?

Re: OLED SSD1306 I2C Address

Posted: Sat Jun 25, 2022 5:29 am
by MJU20
I will look into remapping the I2C.

Too bad it took a week to read this and meanwhile the display was tested with an Arduino sketch using the same IO's as those I used with FC. :shock: