Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssd1306 NO_NAME I2C FW not work rp2040 #2528

Open
tistructor opened this issue Nov 4, 2024 · 12 comments
Open

ssd1306 NO_NAME I2C FW not work rp2040 #2528

tistructor opened this issue Nov 4, 2024 · 12 comments

Comments

@tistructor
Copy link

Hi,
I'm testing with sdd1306 in I2C on a board with rp2040.

It works well if I use I2C in HW but if I use software mode the display remains black.

I used the sample file attached to the library, especially the graphicTest.ino.

I also tried to change the gpio but I don't get results.

@olikraus
Copy link
Owner

olikraus commented Nov 5, 2024

I have no idea what could be the reason. Maybe search in this forum for rp2040.

@tistructor
Copy link
Author

I checked all the problems with rp2040 but there is nothing about the fact that I2C software doesn't work.
I tried in every possible way but the display remains off.
I set the same I2C HW GPIOs in software mode but nothing, it doesn't work.
I'm using the https://github.com/earlephilhower/arduino-pico package
latest version.
I tried adding external pullup resistors on the scl and sda pins but the problem remains.
I can check the quality of the signal and whether it is present with an oscilloscope.

I'm using micro defaul settings no overclocking or anything.

@tistructor
Copy link
Author

I could try powering the display with 5V as it accepts this power while keeping the data level at 3.3V.

But first I'll do a test with 5V arduino and software mode and see if everything works.

@tistructor
Copy link
Author

First I do a test with software to verify that the i2c display is detected correctly.

@tistructor
Copy link
Author

I scanned with software and found 2 addresses:

Device found at 0x79
Device found at 0x7A

However, with the I2C Hw test I only find one address and it is different from the other 2 previous ones.

Finished
Scanning...
I2C device found at address 0x3C !

In theory I should have the same addresses.

@tistructor
Copy link
Author

I tried changing gpio for i2c software and the scan results in the same 2 addresses.

@tistructor
Copy link
Author

I noticed that if I shift to the right of a position I find the correct address of 0x3C.
I think the two programs are not exactly the same.

@tistructor
Copy link
Author

However, the peripheral in I2C sw is detected.
I think it depends on some timing within your library.
I couldn't say anything else.

@tistructor
Copy link
Author

tistructor commented Nov 5, 2024

Software mode that doesn't work:
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=/ D5, / data=/ D4, / reset=*/ U8X8_PIN_NONE);

Hardware mode that works:
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

GPIOs equal.

@tistructor
Copy link
Author

I also did the same graphicTest on an rp2040 module and it works the same way as my coustom card.
I2C HW works and FW mode doesn't work.

@tistructor
Copy link
Author

Tested on arduino one, I2C works both fw and hw.

I also scanned I2C addresses with softwire and in this case I get the correct address 0x3C.

I think there are timing problems with RP2040 in software mode.

@olikraus
Copy link
Owner

olikraus commented Nov 5, 2024

Thanks for the testing and reporting this here. I agree to you conclusion and i am sorry not to be able to help here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants