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

Seeedstudio Grove - OLED Display 1.12" not working/SH1107 #418

Closed
joaodafonseca opened this issue Nov 11, 2017 · 68 comments
Closed

Seeedstudio Grove - OLED Display 1.12" not working/SH1107 #418

joaodafonseca opened this issue Nov 11, 2017 · 68 comments
Milestone

Comments

@joaodafonseca
Copy link

Hi,

I'm trying to run the examples of the library with the Seeedstudio OLED Display 1.12" but I only get glichy characters on the screen!

I'm using the following constructor:
U8X8_SSD1327_SEEED_96X96_SW_I2C u8x8(/* clock=/ SCL, / data=/ SDA, / reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96

and using the pins 18 and 19 for SDA and SCL.

Any ideas? thanks in advance
João

@joaodafonseca
Copy link
Author

Looks like they use a new chip on the modules, SH1107G.
Any change that it's compatible with this library?

@olikraus
Copy link
Owner

Any change that it's compatible with this library?

Is there a link to the SH1107G controller datasheet?

@joaodafonseca
Copy link
Author

joaodafonseca commented Nov 11, 2017

@olikraus
Copy link
Owner

Unfortunately this is NOT the sh1107 Datasheet.

@joaodafonseca
Copy link
Author

hmmm, found it in the oled wiki page:
http://wiki.seeed.cc/Grove-OLED_Display_1.12inch/

@olikraus
Copy link
Owner

Yes, but for the any update I need to know how to program the SH1107. This is not mentioned in any documents of the seeed home page.

The SH1107 datasheet should be provided from "sino wealth". It will contain the command table of the SH1107 controller.

@olikraus
Copy link
Owner

The SH1107 is not even mentioned on the vendor home page. Maybe it is too new.

http://www.sinowealth.com/zh/product.asp?cat_name=OLED&cat_id=35&class_name=OLED%20%C7%FD%B6%AF&class_id=100&from_page=top

@joaodafonseca
Copy link
Author

The library provided by seeed already works with the SH1107. Not sure if it helps!!!

https://github.com/Seeed-Studio/OLED_Display_96X96

@olikraus
Copy link
Owner

Well, partly... For example this code is very strange:
https://github.com/Seeed-Studio/OLED_Display_96X96/blob/master/SeeedGrayOLED.cpp#L290

Without knowing the datasheet of the controller it is difficult to guess what the software does.

@joaodafonseca
Copy link
Author

yeah I see...what about this?
https://www.crystalfontz.com/controllers/SolomonSystech/SSD1327/

@olikraus
Copy link
Owner

What about what? I have the SSD1327 datasheet on my harddisk and the SSD1327 is well supported. But for support of the SH1107 I need a command description of the SH1107, which is in the datasheet of the SH1107. That was your request, right? Support for the SH1107?

@olikraus
Copy link
Owner

olikraus commented Dec 7, 2017

No response, closing this. I need a datasheet of the SH1107.

@olikraus olikraus closed this as completed Dec 7, 2017
@micooke
Copy link
Contributor

micooke commented Dec 12, 2017

@olikraus - try this, i received it today. I plan to host it on github at some stage, but till then:

https://app.box.com/s/45x28nhpp5bik19ci0q9e5r8abr7bdxo

@olikraus
Copy link
Owner

Wow, yes, this is the information i was looking for. Is there still interest for supporting the SH1107?

@micooke
Copy link
Contributor

micooke commented Dec 12, 2017

There certainty is from me 😊

@olikraus
Copy link
Owner

well, then... would you also do some tests for such a device?

@olikraus olikraus reopened this Dec 12, 2017
@micooke
Copy link
Contributor

micooke commented Dec 12, 2017

I would be happy to, but mine is slightly different - I have a 64x128 13pin SPI oled that i can test

@olikraus
Copy link
Owner

ok, so there is a 96x96 seeedstudio and a 64x128 oled.
For adding a display to u8g2, i need someone for testing, so i would start for the 64x128 oled...

@micooke
Copy link
Contributor

micooke commented Dec 14, 2017

@joaodafonseca - if half your screen is garbled (like mine was) try adjusting the screen offset - 0xD3 command. A value of 0x60 (taken from my screen spec sheet) worked for me. Why 0x60? Its 92 - makes no sense to me, and I'm not haopy about that.

@olikraus - the driver is not very different from the SSD1306. I needed to add the offset above, and change my display mode (x20 command)/routine to use the equivalent of what is 'paged' on the SSD1306. The SH1107 only supports Horizontal/Vertical with Column/Page but not Page/Column incrementing (respectively).

I also needed to set the SH1107 specific DC-DC variable setting. This chipset is external Vpp source only.

I modified a modified fork of the SFE library and will push the changes to my fork in a day or so if you are interested.

@olikraus
Copy link
Owner

u8g2 includes a semiautomatic process for the creation of new drivers, so pull requests are a little bit difficult: Pull requests need to update https://github.com/olikraus/u8g2/blob/master/tools/codebuild/codebuild.c

I hope i finde some time for this soon (maybe today evening)

@micooke
Copy link
Contributor

micooke commented Dec 14, 2017

No problem, ill leave the PR then. Hopefully ive helped anyway 😊 . I need to port it to the nrf52832 for testing so ill look at that tonight/tomorrow.

olikraus added a commit that referenced this issue Dec 14, 2017
olikraus added a commit that referenced this issue Dec 14, 2017
@olikraus
Copy link
Owner

I have created a new device for the SH1107 as a copy of the SSD1306 controller:

https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_sh1107.c

The u8x8 constructor is:

U8X8_SH1107_128X64_4W_HW_SPI u8x8(/* cs=/ 10, / dc=/ 9, / reset=*/ 8);

The u8g2 page mode constructor will look like this:
U8G2_SH1107_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=/ 10, / dc=/ 9, / reset=*/ 8);

So now the question is, which changes are required for the SH1107?

olikraus added a commit that referenced this issue Dec 14, 2017
@olikraus
Copy link
Owner

I have added another device for the seeed 96x96 display: U8X8_SH1107_SEEED_96X96_4W_HW_SPI

I have only the init sequence for the SEEED 96x96, so i will start for this.

olikraus added a commit that referenced this issue Dec 14, 2017
@olikraus
Copy link
Owner

ok, i modified init sequence for the SEEED 96x96 constructor. I have not yet added the 0xd3 0x60 offset. In fact i have not seen this in the datasheet.

How shell we continue? Shell i create a u8g2 beta zip lib for testing with Arduino IDE?

To continue I need this:
What is the init sequence for the SH1107 64x128 OLED?
Is there someone who can test the SH1107 96x96?

Thanks, Oliver

@olikraus
Copy link
Owner

hmmm i am somehow stuck... I guess I once need to buy such a display

@micooke
Copy link
Contributor

micooke commented Jan 21, 2018

Hold off for a little bit. I've got a few more things to test first. The screens are about $12AUD from AliExpress including shipping - im certainly happy to pay your cost if you have a bpay.

@micooke
Copy link
Contributor

micooke commented Jan 22, 2018

All sorted.
I was accidentally testing against the full_buffer examples, not the page_buffer examples.

Results are here:
https://app.box.com/s/po1eq5uj5u2isyg6dx2cidvutozr2rhm

Ill upload the changes tomorrow after i clean up the test code if that's alright.

@micooke
Copy link
Contributor

micooke commented Jan 23, 2018

@olikraus - please see cd2bc53 for the changes. Do you want a PR? I don't see many so didn't know your policy.

@micooke
Copy link
Contributor

micooke commented Jan 29, 2018

@joaodafonseca - changes have been merged, time for this issue to be closed 😊

@olikraus
Copy link
Owner

But i need to do some tests with the patch :-/

@micooke
Copy link
Contributor

micooke commented Jan 29, 2018

Whoopsie, sorry - jumped the gun there

olikraus added a commit that referenced this issue Jan 29, 2018
@olikraus
Copy link
Owner

I applied codebuild script... Further testing needs to be done.

@olikraus
Copy link
Owner

olikraus commented Feb 2, 2018

can you download U8g2 2.21.6 from here:
https://github.com/olikraus/U8g2_Arduino

Install via Arduino IDE (add zip lib menu). Will the SH1107 support work? Thanks...
... of course you can also sync the repo...

@olikraus olikraus changed the title Seeedstudio Grove - OLED Display 1.12" not working Seeedstudio Grove - OLED Display 1.12" not working/SH1107 Feb 2, 2018
@micooke
Copy link
Contributor

micooke commented Feb 8, 2018

Hey @olikraus, sorry for the delay (i've been away).
I tested v2.21.7 and its all hunky dory 👍

@olikraus
Copy link
Owner

olikraus commented Feb 8, 2018

Sounds good. I also did some general lib tests, so all looks good.

@olikraus olikraus added this to the 2.21 milestone Feb 13, 2018
@olikraus
Copy link
Owner

So... I hope all is done here and I did not miss anything... closing...

@watershade
Copy link

I am using seeduino(like Arduino Uno) to test Grove-OLED 1.12''. The hardware version is 2.2. It uses SH1107G as driver but screen change to 128*128. And address is 0x3C. I try to use your lib to test but nothing show in my OLED. I have test official library form Here. It is too simple and didn't support V2.2 well. But I can use this to test hardware and I find OLED works well.

@olikraus
Copy link
Owner

Which constructor did you use? Which u8g2 version?

@watershade
Copy link

watershade commented Jun 20, 2018

I use platformio to test it. In platformio library, the newest version of u8g2 is 2.23.8.

image

And I uncomment U8G2_SH1107_128X128_1_HW_I2C u8g2(U8G2_R0);
I don't know if I am right?

@olikraus
Copy link
Owner

Yes looks good. However, I have never tested this device, I can only refer to the statement from @micooke

Do you see any activity on the I2C lines?

@micooke
Copy link
Contributor

micooke commented Jun 21, 2018

I have an SPI screen and it works perfectly! @watershade did you try the full page buffer or half page?
#418 (comment)

@watershade
Copy link

@micooke
I have tested in I2C interface. I think I using half page. Actually, I just want to test which library is sure for SH1107. The official moudule of seeed can be used but lack of funtions. I find yours and u8g2 is good. But It is strange I didn't find the spi oled from seeed. I find the moudule I got is I2C-interface.

@s-light
Copy link

s-light commented Oct 12, 2021

funny enough seeedstudio is referencing u8g2 in there example -
https://wiki.seeedstudio.com/Grove-OLED_Display_1.12inch/#software
but from the downloaded
https://www.arduino.cc/reference/en/libraries/u8g2/
version 2.13.5
(same as in the seeedstudio screenshot)
did not have a U8G2_SH1107_SEEED_128X128_1_SW_I2C constructor -
and in general no SH1107.
so is the SH1107 support dropped?
the Grove - OLED Display 1.12 device is used here in an school Hackdays material set...
so i stumble over this problem every now and then...
and i would love to use the u8g2 lib and not revert back to the old minimalistic OLED_Display_96X96

in some days - 25.10.21 - i can test with an actual device from SeeedStudio.

@micooke
Copy link
Contributor

micooke commented Oct 12, 2021

@s-light try using a version of the library from 2.21.7 onwards, as referenced in this issue

@s-light
Copy link

s-light commented Oct 12, 2021

i just checked and in the latest release 2.31.2 from the arduino page]() i can indeed find the needed constructor -
(and in the release notes it says support was added in 2.26.* ....)
so if i get a display in my hands i will check with this version !

@micooke thanks for the pointer!!

i think my problem was every time i searched i used SH1107G (with the G) and did not find anything...

@micooke
Copy link
Contributor

micooke commented Oct 12, 2021

Goodluck!

@s-light
Copy link

s-light commented Oct 25, 2021

confirmed. with the newest version it is working as expected.

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

No branches or pull requests

5 participants