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

I2C not working on SSD1327 #699

Closed
Andrzej1000 opened this Issue Sep 7, 2018 · 10 comments

Comments

Projects
None yet
2 participants
@Andrzej1000
Copy link

commented Sep 7, 2018

Hi.
I have SSD1327 128x128 form waveshare.
The library working on SPI.
Unfortunately I2C does not work.
The display does not light anything.
I checked example code from waveshare and it works.
Olikraus could you check what's going on?
Thanks...

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 7, 2018

You say, SPI works, but I2C doesn't work, right?

@Andrzej1000

This comment has been minimized.

Copy link
Author

commented Sep 8, 2018

Yes.
SPI working but I2C not work.

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2018

ok, I am still confused (also by your reply here #397): Does you display work with u8g2 in SPI mode?

@Andrzej1000

This comment has been minimized.

Copy link
Author

commented Sep 8, 2018

SPI working with your library:
//U8G2_SSD1327_MIDAS_128X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=/ 13, / data=/ 11, / cs=/ 10, / dc=/ 9, / reset=/ 8);
//U8G2_SSD1327_MIDAS_128X128_1_4W_HW_SPI u8g2(U8G2_R0, /
cs=/ 10, / dc=/ 9, / reset=/ 8);
//U8G2_SSD1327_EA_W128128_1_4W_HW_SPI u8g2(U8G2_R0, /
cs=/ 10, / dc=/ 9, / reset=*/ 8);

I2C with library U8G2 not working:
//U8G2_SSD1327_EA_W128128_1_SW_I2C u8g2(U8G2_R0, /* clock=/ 5, / data=/ 4, / reset=/ U8X8_PIN_NONE);
//U8G2_SSD1327_EA_W128128_1_HW_I2C u8g2(U8G2_R0, /
reset=*/ U8X8_PIN_NONE);

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2018

ok. Did you connect DC input line of the display to GND (so that the default I2C address is 0x78)?

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2018

I crosschecked the software. Everything should be ok.

@Andrzej1000

This comment has been minimized.

Copy link
Author

commented Sep 8, 2018

OK. It works. DC connected to GND. Thank you very much !!!
Please, make init string U8G2 for the default address without this connecting...?

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2018

In I2C mode, you must connect connect the DC input to either low or high, you can not leave it open. If open, then the display will draw much more current and the I2C address is unpredictable. All in all you should follow the wiring instructions in chapter 8 of the SSD1327 controller datasheet.
Depending on the level applied to DC input, you should inform U8g2 about the selected I2C address.

See here:
https://electronics.stackexchange.com/questions/7179/is-it-really-a-bad-idea-to-leave-an-mcu-input-pin-floating
and here:
https://www.quora.com/Why-is-it-not-advised-to-float-inputs-to-CMOS-gates-under-any-circumstances#

In general U8g2 always uses the lowest I2C address allowed by the display. I would personally call this a useful default.

@Andrzej1000

This comment has been minimized.

Copy link
Author

commented Sep 8, 2018

Thanks for the clarification.

@Andrzej1000 Andrzej1000 closed this Sep 8, 2018

@olikraus

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2018

:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.