-
Notifications
You must be signed in to change notification settings - Fork 1k
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
2.42-inch Waveshare OLED SSD1309 and contrast problem #2408
Comments
which exact constructor did you use? |
U8G2_SSD1309_128X64_NONAME0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=/13, / dc=/16, / reset=*/17); It works very well, except for the ability to change the contrast. |
I checked the code, but the setContrast() command should work. u8g2.sendF("ca", 0x81, contrast); // 'contrast' is the desired contrast value to manually set the contrast (see also https://github.com/olikraus/u8g2/wiki/u8g2reference#sendf) Sometimes the contrast command for the display (0x81) does not have the desired effect. In such cases could play around with the 0xd9 or 0xdb command of your display. |
See also here: #1504 |
hi Oli @olikraus, I'm facing similar issue.
none of them works. any clues? the only thing that works for me is |
There should be some more related questions. Did you check the issues for more information? Life shouldn't be affected unless you increase brightness a lot. |
I've dug through all of the other related issues I could find. |
For OLEDs the 0x81 command indeed doesn't change much by itself. Usually a combination of multiple commands is required to reduce brightness to zero. I have cellphone access only at the moment and searching in the GitHub issues with the app is a pain, but there should be issues regarding this. Also look out for ssd1306 , which should have the same commands. |
I think the above mentioned issue should contain all required information. |
I forgot to mention that my code already had:
and it was called with:
I'm working with https://github.com/Pako2/esp-oledproc and the web interface didn't have convenient way to change these values, so I had to rewrite flash all the time, and it wasn't really doing anything. after adding the VcomDeselect and PreChargePeriod inputs via the web interface, I was now able to test it much faster. does this makes sense? btw, setting low p2 to achieve low brightness, causes the display to look very bad (almost not understandable), it seems the minimal acceptable value is 2, and I've set it to 3. all in all the brightness (contrast...) control is very flimsy and obfuscate, at least on my ssd1309... |
LED dimming is done via pulse wide modulation in all the displays. This approach however has issues and shows artefacts with very low brightness values, so this is a general problem. It might be influenced by the display if the vendor didn't add sufficient capacity at the power supply lines and as part of the charge pump ( your OLED probably requires 15V which is generated on the PCB itself). You might improve the situation by adding a 0.1uF, a 1uF and a 2.2uF ceramic cap close the the power supply of your OLED. |
Hi there! Thanks a lot for your work. I managed to get the 2.42-inch Waveshare OLED display up and running. Everything would be fine if it weren't for the lack of ability to adjust the contrast of this display. According to the manufacturer, the display supports contrast control. Unfortunately, I can't seem to achieve it. Has anyone had a similar issue?
Additionally, I'll mention that I have the display connected via SPI to an ESP32.
Here's datasheet: https://files.waveshare.com/wiki/2.42inch-OLED-Module/SSD1309Datasheet.pdf
The text was updated successfully, but these errors were encountered: