Problem with a SPI Serial 128 X 64 OLED

Hi I've got some 128 X 64 OLEDs with 6 connecting pins and I haven't got any problem to do working properly: I know how I should connect and the drivers that I should use.

A few days ago, I bought other 128x64 OLED but it's different. It has got 7 pins. The 7 pins are labelled :
GND: power ground
VCC: 2.8V or 5.5V power supply
D0: CLK clock
D1: MOSI data
RST: reset
DC: data / command
CS: chip select signal

The link to the product is: http://www.aliexpress.com/item/White-0-96-I2C-IIC-SPI-Serial-128X64-OLED-LCD-LED-Display-Module-for-Arduino-SG099/32367800140.html

and I've tried different libraries and conections without sucess. Does anybody know how I should connect the OLED? And the drivers for arduino ?

Thanks in advanced

hmm.. what exactly is not working? Is it simply black?
Did you try u8glib?

Oliver

That appears absolutely identical to the displays I purchased from China via eBay. I have run them at 5V and 3.3V connected just as you describe. Adafruit SSD1306 libary works. U8glib works.

olikraus:
hmm.. what exactly is not working? Is it simply black?
Did you try u8glib?

Oliver

Thanks for answering

Yes it's only black. And Yes I tried u8glib without sucess

jboyton:
That appears absolutely identical to the displays I purchased from China via eBay. I have run them at 5V and 3.3V connected just as you describe. Adafruit SSD1306 libary works. U8glib works.

I have got this

http://es.aliexpress.com/item/Free-Shipping-Yellow-Blue-0-96-SPI-Serial-128X64-OLED-LCD-Display-Module-for-Arduino-STM32/32289769146.html

too.

Only has got 6 pins and it works with U8glib - U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9 -

But the other I can not do to work properly because I don't know how I should connect the 7 pins
. Could you say to me how you connect the pins

D0: CLK clock to ?
D1: MOSI data to ?
RST: reset to ?
DC: data / command to ?
CS: chip select signal to ?

and what option from U8glib I should choose?

Thanks in advanced

D0 to SCK and D1 to MOSI for hardware SPI . For software SPI you can choose whatever pins you want. The other pins are also user choices.

The Adafruit example "ssd1306_128x64_spi" works without any changes. It has the pin definitions in the sketch. It's set up for software SPI, but it also works with hardware SPI (and is faster) if you remove "OLED_MOSI, OLED_CLK," from the constructor, at least on an Uno where SCK=13 and MOSI=11.

The old sketch I have for u8glib doesn't work. I don't know how it ever did since it doesn't have reset defined. I must have misremembered trying it with this particular display. I'm sure it works; I just don't have the right constructor.

RST pin can be set to the u8glib constructor as 5th pin.

Oliver

This morning I've tried the Adafruid library: it works OK.

The U8GLIB doesn't work properly with my OLED with 7 pins ( it works with my others 6 pin OLEDs)

Thank you

Try this:

// u8glib "Hello world" for 128x64 SSD1306 display -- H/W SPI

#include "U8glib.h"

// Pin definitions

// For H/W SPI:
// D0 = SCK  (pin 13 on Uno)
// D1 = MOSI (pin 11 on Uno)

#define OLED_CS    7
#define OLED_DC    8
#define OLED_RESET 9

U8GLIB_SSD1306_128X64 u8g(OLED_CS, OLED_DC, OLED_RESET);

void draw(void) {
  char buf[5];
  u8g.setFont(u8g_font_unifont);
  u8g.drawStr(0, 15, "Hello World!");
}

void setup(void) {
  u8g.setColorIndex(255);     // white
  u8g.firstPage();  
  do {
    draw();
  } while(u8g.nextPage());
}

void loop(void) {}