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

Support for OLED 64x32 #254

Closed
sympthom opened this issue Apr 30, 2017 · 21 comments
Closed

Support for OLED 64x32 #254

sympthom opened this issue Apr 30, 2017 · 21 comments
Milestone

Comments

@sympthom
Copy link

Hi,

Thanks for a great library and great job!

Are the support coming for the 64x32 OLED display in the near future?

Cheers,
Martin

@olikraus
Copy link
Owner

Any datasheet available?
Can you do testing for me?

@sympthom
Copy link
Author

Should be it: http://www.buydisplay.com/download/manual/ER-OLED0.49-1_Series_Datasheet.pdf

Sure, I will give it a go.

@sympthom
Copy link
Author

@olikraus
Copy link
Owner

olikraus commented May 1, 2017

Can you test the U8G2_SSD1306_64X48_ER device? what will you see? Can you send me a picture of the hello world example?

@sympthom
Copy link
Author

sympthom commented May 1, 2017

I've ordered a few devices. As soon I get them by mail I will be able to do some testing.

Here is a port already for the 64x32: https://github.com/WaiakeaRobotics/Adafruit_SSD1306

@olikraus
Copy link
Owner

olikraus commented May 1, 2017

Where did you order these devices? Maybe i can also order one.

@sympthom
Copy link
Author

sympthom commented May 1, 2017

@olikraus
Copy link
Owner

olikraus commented May 1, 2017

Hmm this seller does not ship to my country.
I will order this:
http://www.ebay.com/itm/White-0-49-inch-OLED-Display-Module-64x32-0-49-I2C-IIC-for-Arduino-AVR-STM32/371842373740

@olikraus olikraus added this to the 2.15 milestone May 4, 2017
@olikraus olikraus modified the milestones: 2.16, 2.15 May 21, 2017
@olikraus
Copy link
Owner

OLED did not yet arrive at my lab. moving this to next milestone.

@sympthom
Copy link
Author

Yep, same situation here, still waiting on mine to arrive.. China shoud be a whole lot closer..

@sympthom
Copy link
Author

I finally got the OLED.. I'm doing the coding and am starting from the 64x48 as a boilerplate. Any pro tips from you as I progress?

@olikraus
Copy link
Owner

I guess I need to create a device for this first. Then we both can modify this, until the display works correctly.

@olikraus
Copy link
Owner

I created a new 64x32 device as a copy of the 64x48.
Download the new u8g2 version here:
https://github.com/olikraus/U8g2_Arduino/archive/master.zip
You need to manually add this zip file via the Arduino IDE "Add Zip Library" menu.

All examples now contain a 64x32 constructor.
For example the u8x8 flipmode has this:
U8X8_SSD1306_64X32_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);

Of course all other types of constructors also exist (HW_SPI, SW_SPI, etc)

there is also a new file: u8x8_d_ssd1306_64x32.c The content of this file needs to be modfied for your display. Maybe you can send me the output of HelloWorld.ino so that we can update this file together.

@sympthom
Copy link
Author

Oh, I've just finished the code myself and was going for a pull request. :) Well nicely done on your end. I will undo my code and will start test 2.16.0 instead.

@olikraus
Copy link
Owner

olikraus commented Aug 4, 2017

Any further feedback on this?
@sympthom9 does this work for you?

@olikraus
Copy link
Owner

closing this, lets see whether this works...

@k1hop
Copy link

k1hop commented Sep 18, 2017

hi olikraus, Not sure if it's okay for me to leave another comment after you closed this issue, but if not, just tell me where to post it.

I recently purchased a 64x32 OLED display from ICStation.com (http://www.icstation.com/blue-049in-oled-display-module-64x32-screen-arduino-stm32-p-10787.html) and was having some troubles while using u8x8 library to drive it with an Arduino.

I was able to determine the I2C address and talk to it and get "stuff" to appear on the screen. However, first I noticed that the u8x8.clear() function only cleared about the top half of the display and left RAM random garbage on the bottom half. I read that one might have to alter the u8x8_d_ssd1306_64x32.c file for each particular display, so I started playing with that.

First, I changed the DISPLAY OFFSET value and was able to move things around a bit to where it looked pretty normal. It appeared that for some reason the entire display was "shifted up two lines" (for text) so the first two lines were off the display entirely, and the last two lines were in the top half. But below these lines in the bottom half was still the random garbage which was never being cleared.

On a lark (not really knowing why or what I was doing) I decided to put the multiplex value back to 0x2f instead of the 0x1f the comment said it had been changed to. I reset my DISPLAY OFFSET to 0x000 and voila, everything looked perfect... and addressing was correct... AND the garbage was now being cleared by the u8x8.begin() command!!

A bonus is that the display appeared brighter to my eyes... though maybe that was psychological due to the garbage disappearing and everything looking cleaner. But perhaps with a different multiplex value it was in fact brighter???

Anyway, thought I'd pass on these notes re this particular display. I don't know if it's the same as the ones you guys played with months earlier or not. I have NO specs on the display itself, but it's working great with this change!

If I had not found this post, I'd probably have thrown my hands up in frustration by now! :)

Russ K1HOP

@olikraus
Copy link
Owner

Sounds great. Can you share the modified code by pasting it here?

@olikraus olikraus reopened this Sep 19, 2017
@k1hop
Copy link

k1hop commented Sep 19, 2017

No sense posting the entire program for an ultimate change of ONE CHARACTER! :)
In the program u8x8_d_ssd1306_64x32.c this is the one and only change that ultimately did the trick:

U8X8_CA(0x0a8, 0x1f), /* multiplex ratio: changed from 0x1f to 0x2f */

As you can see from YOUR original comment which I did not change, it had been changed from 0x1f to 0x2f. I simply changed it back to 0x1f again.

Russ

@olikraus
Copy link
Owner

Ah, ok, great. Now I understand your modification. :)

@olikraus
Copy link
Owner

olikraus commented Sep 19, 2017

Will be continued here: #361

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

3 participants