[SOLVED] Using u8glib with East rising ER-OLEDM028/32 (SSD1322)

Hi Guys,
A quick followup question

I've been successfully using the NHD31OLED_2X_GR const for the screen.
how ever I don't need the extra grayscale resolution. and would have like to save the extra bits to improve FPS and go with
NHD31OLED_2X_BW. however, when doing this the screen will draw two bright lines at the edges that are on. is there a software solution to use the BW on a GR screen?

Thanks,
Uri

however, when doing this the screen will draw two bright lines at the edges that are on. is there a software solution to use the BW on a GR screen?

Did you enable the 16 bit mode for u8glib?

Uncomment

#define U8G_16BIT 1

at the beginning of u8g.h

Oliver

I have now :slight_smile:
Thanks!

Arduino Uno - HW SPI

BW -16 bit X2
clip: 11.3
clear: 2.6
@: 3.9
pixel: 1.9

BW -16 bit X2
clip: 10.4
clear: 2.0
@: 2.8
pixel:1.1

GR -16 bit X2
clip: 6.7
clear: 1.3
@:1.6
pixel: 0.6

but how did the "GR" worked with that flag off? wasn't is supposed to be the same (with lines) - or in GR they were just off rather then on?

In 16 bit mode, the flag will extend the internal width of the display from 248 to 256. I assume the display actually has a width of 256 pixel, so the 16 bit mode is required.
I can not test the code, so i guess in the GR mode, it was set to blank, while in BW mode, it is set for some reason.

Oliver

Hi Oliver!

I need your help!

I have this screen: http://www.buydisplay.com/default/oled-3-2-inch-displays-module-companies-with-driver-circuit-blue-on-black

I used this constructor: U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9);

I soldered BS1-0 and BS0-0
R19 and R21 = ON
R18 and R20 = NC

It uses 4 Line SPI scheme and I successfully connected it to my Adruino UNO, but I have noisy screen.

What problem could be? I was trying to use Uri's solution step by step - but nothing!

Hi

What means "successfully connected"? What is a noisy screen?
How are lines connected? Do they match the u8glib constructor?
Maybe you can post a picture of the display and Arduino together.

Oliver

Connection regarding photo:

Green Wire: SCLK (4pin on screen)
Blue Wire: MISO (5pin on screen)
Yellow: CS (16pin on screen)
White: A0 (14pin on screen)

Orange: reset(15pin on screen) (but it doesn't mater if it's disconnected)

Constructor:
U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9

Where:
13 - SCLK
11 - MISO
10 - CS
9 - A0

and for code, I use examples from U8glib library

Hi

You should inform U8glib about the reset line (5th argument):

U8GLIB_NHD31OLED_2X_GR u8g(13, 11, 10, 9, 8);  // looks like reset is at pin 8 of the Arduino according to the photo

According to the SSD1322 datasheet, D3..D7 (pin 8, 9, 10, 11 of the OLED) must be connected to GND.

Did you also try the BW variant as constructor?

Oliver

Edit: Code tags

Thanks Oliver!

It works now! The mistake was in soldering, I connected 13 pin instead of 14pin on the screen for A0! And I added 5th argument to the constructor!

Thank you for your advice!

Great!

Oliver

Hi Oliver!

I have a question regarding anti-aliasing support for draw(circle, line... etc).

Is there any option to turn on it? :slight_smile: or it's impossible for now?

Hi

I once started working on this, but it never went to the library itself.
Maybe this is usefull for you:

Oliver

Thanks to this thread, Oliver Kraus' inputs & u8glib graphics library I was able to enable an East Rising 256x64OLED model ER-OLEDM032-1G connected to Arduino Uno through the hardware SPI bus

Video link:
Arduino with Graphics 256x64 OLED

To enable 4 line SPI the data sheet mentions -

1)0 resistor (jumper) connected on :
R19 below marked BS1
R21 below marked BS0

2)shorting to ground (-ve) pins :
7 DB3
8 DB4
9 DB5
10 DB6
11 DB7
12 /RD
13 /WR

While ordering the OLED, I asked the seller to solder the resistances - R19 & R21 for SPI 4 line mode prior to shipping.

Nice, thanks for sharing
Oliver

Made a separate post before but Didn't realize there was already a similar thread going on.

I am trying to make a custom boost gauge using the 3.12" 256x64 SSD1322 display from New Haven using u8glib. The left half of the screen displays a static 128x64 bitmap, and the right half displays the PSI reading. Even while using Hardware SPI and a larger page height, the screen is not refreshing smooth enough for my liking.

The only three solutions I suppose are

  1. First draw the the bitmap on the left side, then switch the column start address to the middle of the screen so now it only has half as many pixels to refresh. (not sure if this is possible?)
  2. Same thing as above, but use two separate instances of u8g addressing each 128x64 halves of the display. (again, not sure if that's possible)
  3. Run the display in parallel mode

Though to run in parallel mode would be the easiest solution, im having trouble figuring out how to run the display in parallel mode using u8glib. I tried setting the initial parameters as:

U8GLIB_NHD31OLED_2X_BW u8g(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, U8G_PIN_NONE, U8G_PIN_NONE);

However it does not work. Just a blank screen.

Would greatly appreciate any help :slight_smile:

Hi
I have never tested this display in parallel mode. It should however work and often this is a hardware issue and not a software problem: Did you use level shifters? Are the RD and Reset lines wired correctly?

Oliver

olikraus:
Hi
I have never tested this display in parallel mode. It should however work and often this is a hardware issue and not a software problem: Did you use level shifters? Are the RD and Reset lines wired correctly?

Oliver

No I am not using level shifters. My mistake, I keep forgetting this is not a 5v display :stuck_out_tongue: .
I assumed the RW and Reset lines were not used? I tried running it with and without and still no luck.
The parameters using RW and Reset I wrote as

U8GLIB_NHD31OLED_BW u8g(2,3,4,5,6,7,8,9,10,11);

and still no luck. The names of the hardware pinouts don't seem to match up with the code. On the data sheet the pins for M68 Parallel are:
d0-d7, DC, RW, E, Reset and CS.

But the code only lists:
d0-d7, CS, DI, RW, Reset.

Hi

This is the constructure
U8GLIB_NHD31OLED_BW(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t cs, uint8_t di, uint8_t rw = U8G_PIN_NONE, uint8_t reset = U8G_PIN_NONE)

"cs" has to be connected with CS from the display

"di" (data/instruction) must be connected with the data/instruction/command line of the display (i guess this is DS). Unfortunately there is no common naming convention for this, so several names are there in the datasheets.

"rw" must be connected to "E" (6800 mode)

"reset" might be connected to the reset line of the display. If you do not connect the Arduino with the reset line, you still have to feed some usefull reset into the display (e.g. a signal from an RC network)

There is another line in the display, which must be connected correctly. If i remember correctly, this is the WR line from the 6800 mode. It must be connected to GND (not sure) so that the Arduino has write access. U8glib does not read from the display, so the hardware setup can be in such a way, that the software only has write access.

Oliver

hi. What I need to use pins to Arduino Leonardo?