OLED Display question

This is probably just the beginning of my saga, but... I have a OLED 128X64 display I bought off EBay. The documents they reference for this are the U8g library and the 1306 Controller datasheet. First I cannot figure out which constructor I should use from the U8g library and I don't know how to map my pins to the U8g constructor. So my pins are: GND,VCC,D0,D1,RST and DC. I think I understand GND and VCC, but translating the others to U8g terminology is a problem. Can someone help? Thanks.

Oh and one other thing the Datasheet says the display (Vcc) should be 7 to 15V. Does that mean I need something other than the 5V I can get from the Arduino?

I suggest to read these 21 pages (click !), it's worth it.

Can you give some link to the exact product you bought ?

Hi

The pin names D0,D1,RST and DC refer to page 14 of the data sheet. Depending on the setup of your OLED, the pins might have different functionality: Please figure out how your display has been configured. U8glib supports I2C and 4-Wire SPI. Often this is selected by two or three solder bridges. Maybe you can sent a picture fo the PCB to discuss this.

Based on this setup, you can select the u8glib constructor.

Oliver

Oliver: When you refer me to page 14 of the document are you talking about page 14 of the pdf SSD 1306 Data sheet?

Attached is the PCB picture. Thanks.

-- Richard

The ad for the product says it is and SPI interface, I don't know about 4 wire.

-- Richard

Here is the link for the specific product.

Hi Richard

Yes, i refer to page 14 of the ssd1306 datasheet:
D0 = serial clock / SCK
D1 = serial data / MOSI
DC = data / command selection = A0 in U8glib
RST = reset line

Since there are no solder bridges, i assume this is a 4-wire SPI display, so you could start with this constructor:

U8GLIB_SSD1306_128X64(sck, mosi, cs, a0 [, reset])

It looks like that the CS line is missing. Use U8G_PIN_NONE as third argument. Provide the Arduino pin numbers for the first, second, fourth and fifth argument.

Oliver

 U8GLIB_SSD1306_128X64 u8g(13, 11,U8G_PIN_NONE, 9 , 8);

I had to put this in to make the code compile. Am I dealing maybe with an older version of U8Glib? Thanks.

-- Richard

Hi

The constructors are just examples. Individual setup is often required.

Oliver

U8GLIB_SSD1306_128X64 u8g(11, 13,U8G_PIN_NONE, 9, 8);

U8GLIB_SSD1306_ADAFRUIT_128X64 u8g(13, 11,U8G_PIN_NONE, 9, 8);

U8GLIB_SH1106_128X64 u8g(13, 11,U8G_PIN_NONE, 9, 8);

I've checked each of the logic outputs from the processor and they appear to be functioning correctly. Providing 3.3 v high. The voltage to the OLED (Vcc) is from a 9V battery.

I've tried each of the above constructors with the arguments shown without success. Any other suggestions? Thanks.

-- Richard

Hi

9V for the OLED? It should work fine with 3.3V power supply.
I assume you have double checked the connection.

Usually the CS signal is required, because it is also used to put the display into a defined initial state.
You could post a picture of your setup for review.

Oliver

Well I got the voltage for Vcc from the data sheet it said 7-15V. Is that wrong?

I am having problem getting a decent picture of my setup. Will send when I get a good one.

-- Richard

To my knowledge, it is one of the features of the SSD1306 to generate the high voltage with its internal charge pump. In fact it might have destroyed the OLED.

Oliver

Some displays have level converters and are 5V tolerant but 9V will most likely blow it up.

Hello everybody,
I bought a 0.96 "IIC I2C SPI Seriale 128x64 OLED Display LCD LED and it have 6 cable GND, VCC, SCL, SDA, RST, D/C.
The write SCL and SDA are incorrect or probably you have to solder something ( Iread it on the forum). Anyway if you want to use your oled display use U8GLIB with this string

U8GLIB_SSD1306_128X64 u8g(12, 11,U8G_PIN_NONE, 9 , 8 );

PIN 12 -> SCL
PIN 11 -> SDA
PIN 9 -> D/C
PIN 8 -> RST
VCC -> 5 V or 3.3 V (depends on you device, start with 3.3, if doesn't work switch to 5V or better check the datasheet)
GND -> GND

power.dragon:
Hello everybody,
I bought a 0.96 "IIC I2C SPI Seriale 128x64 OLED Display LCD LED and it have 6 cable GND, VCC, SCL, SDA, RST, D/C.
The write SCL and SDA are incorrect or probably you have to solder something ( Iread it on the forum). Anyway if you want to use your oled display use U8GLIB with this string

U8GLIB_SSD1306_128X64 u8g(12, 11,U8G_PIN_NONE, 9 , 8 );

PIN 12 -> SCL
PIN 11 -> SDA
PIN 9 -> D/C
PIN 8 -> RST
VCC -> 5 V or 3.3 V (depends on you device, start with 3.3, if doesn't work switch to 5V or better check the datasheet)
GND -> GND

Thank-you. Working on ebay blue/yellow display
'Yellow+Blue 0.96" SPI Serial 128X64 OLED Display Module for Arduino/STM32/51 GT'

IMG_0847.JPG

So I have a question, how to connect that kind of OLED with lines GND, VCC, SCL, SDA, RST, D/C to Uno via hardware SPI ? SW one is waaaaay too slow.

My understanding from the specs is that the I/O is 5V ready.
The power should still be 3.3v. Not all will work well with 5v driving
the inputs. I use a 74lvc254 between my MAGA that has 5 volt
I/O, just in case. From what others have said, they see flicker
during the writes, with the 5 volt drive.
As was mentioned, the 9V is if you don't use the built in charge
pump and that pin is not brought out on the little blue board with
6 pins. It is jumpered to the output of the charge pump.
If you want it to be faster, you can hack the pins off ground and
use one of the two uP modes, at the price of using more I/O.
You write all 8 bits at a time.
Dwight