128x64 OLED

Hi all,

I have purchased a OLED display but it is very confusing

http://www.ebay.co.uk/itm/121513407102?_trksid=p2060778.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Here is what is says on the advert

100% brand new and high quality
No font: take the word with modulo software
Needn't backlight, the display unit can self-luminous

Specifications:
High resolution: 128 * 64
Viewing angle:> 160掳
Supports many control chip: Fully compatible with Arduino, 51 Series, MSP430 Series, STM32 / 2, CSR IC, etc.
Ultra-low power consumption: full screen lit 0.04W
Voltage: 3.3V ~ 5V DC
Working Temperature: -30 鈩?~ 80 鈩?Module Size: 27.0MM * 27.0MM * 4.1MM
SPI Interface, need 4 IO only.
Driver IC: SSD1306
Light color: Yellow+blue
Pin Definitions:
VCC:3.3-5V
GND: grounding
CLK: clock module
MOSI: Data input
Cs: Chip select signal
D/C: Command / data change

Package includes:
1 x Yellow+Blue 0.96" SPI Serial 128X64 OLED LCD Display Module

As you can see is says it's SPI but the pins look like I2C (to me!) also on the actual device it has SDA+SCL but also D/C. Also it weas cheap so I am starting to think there is something missing, so at this point i am totally confused.

Here are my questions

  • Does it look like I can connected this to a nano and get it working

  • Is there any other hardware needed

  • Is it SPI or I2C

  • If it is I2C where do these lines go to on the nano (I am using the Adafruit SSD1306 libs + examples for 128x64 OLED display)

  • RST

  • D/C

I have tried to get this working with both SPI and I2C but think KNOW I got confused :-\

Thanks in advance

Steve

Hi

This OLED has an SPI interface.

Same display has been diskussed here: OLED Display question - #11 by olikraus - Displays - Arduino Forum

Remarks:

  1. D/C is the Data/Command line (A0 in U8glib).
  2. This display has no CS (Chip Select) line, which may or may not work

Oliver

Maybe you can connect the SCL/SDA lines (plus power/gnd) to the arduino and use an I2C scanner like here to see if it finds anything. If it does then it's I2C if not then maybe it is SPI.

@Riva
Some displays may be invisible to the the I2C scanner due to the fact that they do not send a proper ACK response. This was discussed (and solved) here: Problem with SSD1306 LCD and U8glib - Displays - Arduino Forum. So, if the i2c does not find a device, it does not mean anything.

Anyway, the OP has a SPI display.

Oliver

Quick reply @ Oliver, this is not the same display as you posted a link to (see pictures) but I will try to figure it out from all the info so far, but if anyone give shine more light on this it would be helpful.

Thanks everyone so far.

Steve

Hmmm, failed to load pics, maybe it's because I'm new....

back again,

Maybe I just don't get it but as I try to figure how to wire this I keep hitting the same issue, when I look at this display it has printed on the PCB SCL, SDA, RST and D/C, does SCL+SDA not indicate I2C. if this is SPI why are they not labelled MISO+MOSI and where are the SCK + SS

Here is what I have tried so far without success.

Display -- Nano

SCL -> SCL (A5)
SDA -> SDA (A4)
D/C -> D3
RST -> D5
VCC -> 5v
GND -> GND

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// If using software SPI (the default case):
//#define OLED_MOSI   9
//#define OLED_CLK   10
//#define OLED_DC    11
//#define OLED_CS    12
//#define OLED_RESET 13
//Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

// Uncomment this block to use hardware SPI
#define OLED_DC     6
#define OLED_CS     7
#define OLED_RESET  8
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);
//*/

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2

#define LOGO16_GLCD_HEIGHT 16 
#define LOGO16_GLCD_WIDTH  16 
static const unsigned char PROGMEM logo16_glcd_bmp[] =
{ B00000000, B11000000,
  B00000001, B11000000,
  B00000001, B11000000,
  B00000011, B11100000,
  B11110011, B11100000,
  B11111110, B11111000,
  B01111110, B11111111,
  B00110011, B10011111,
  B00011111, B11111100,
  B00001101, B01110000,
  B00011011, B10100000,
  B00111111, B11100000,
  B00111111, B11110000,
  B01111100, B11110000,
  B01110000, B01110000,
  B00000000, B00110000 };

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

void setup()   {                
  Serial.begin(9600);
  
  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC);
  // init done
  
  // Show image buffer on the display hardware.
  // Since the buffer is intialized with an Adafruit splashscreen
  // internally, this will display the splashscreen.
  display.display();
  delay(2000);

  // Clear the buffer.
  display.clearDisplay();

  // draw a single pixel
  display.drawPixel(10, 10, WHITE);
  // Show the display buffer on the hardware.
  // NOTE: You _must_ call display after making any drawing commands
  // to make them visible on the display hardware!
  display.display();
  delay(2000);
  display.clearDisplay();

 ........... full Code was not allowed > 9000 characters

Thanks

Steve

@ Oilver

I used your U8gLib and the GraphicsTest example with this construct

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

and the nano connected like this

Display -- Nano
SCL -> 13 (D10)
SDA-> 11 (D9)
D/C -> 9 (D6)
RST -> NC
VCC -> 5V
GND -> GND

Still nothing.....

Steve

Hi

You could try this:

U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9, 8);   // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8

Display -- Nano
SCL -> 13 (D10)
SDA-> 11 (D9)
D/C -> 9 (D6)
RST -> Arduino Pin 8
VCC -> 5V
GND -> GND

As i mentioned before, I have no confirmation, that this kind of Display (without CS) works with any Arduino library.

Oliver

Hi Oliver,

Connected up like you said but still nothing, it's looking like this display will not work. What is the cheapest you have seen that will work?

Steve

scarr:
Hi Oliver,

Connected up like you said but still nothing, it's looking like this display will not work. What is the cheapest you have seen that will work?

Steve

I have one of these and it works fine with Adafruit library.

Hava a look at my gallery page: Google Code Archive - Long-term storage for Google Code Project Hosting.

SPI: Must have MOSI & SCK (or D0/D1), CS and C/D pin (usually six pins)
I2C: Must have SCL and SDA pins (usually four pins)
Additional reset line is ok for both displays.

Oliver

I also purchased this display on ebay and have been going crazy trying all sorts of stuff. I was able to get at least a flickering screen using the U8glib examples and this constructor:

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

I don't know if the flickering means anything that would lead anyone else with more experience to chime in. I'm at a loss and could use any advice available. BTW, I used the 3.3v on my UNO and not the 5v line.

@ Riva, If you would answer the following maybe I can get it working

  1. What Arduino did you use?

  2. I Assume is was I2C you used?

  3. Can you list pin to pin for us?

Thanks

Steve

scarr:

  1. What Arduino did you use?
    I tested it on an UNO

  2. I Assume is was I2C you used?
    Yes, that's the only interface it has.

  3. Can you list pin to pin for us?
    GND to GND on arduino
    VCC to 5V
    SDA to A4
    SCL to A5

I then used an I2C Scanner sketch to find the address used for the module and ensured this is the same as used in the AdaFruit 128x64 example sketch downloaded with there library.

 display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3C (for the 128x64)

Just to avoid further frustration: The procedure from Riva will work with all Adafruit products. It will also work with 50% of the desplays from various market places.

If the procedure, mentioned by Riva, does not work then:
A) it may have a different controller, namly the SH1106, which is not supported by the Adafruit lib, or
B) it may not produce the correct ACK signal on the I2C line. In this case it will not be recogniced by the I2C scanner and also the Adafruit lib will not work.

Another suggestion: You select an interessting OLED from one of the marketplaces. Paste the link here and we give our comments whether we assume it will work or not.

Oliver

Hi All,

@ Riva

OK so I purchased a display just like yours (4 pin) SDA/DCL/GND/VCC tried it with the Adafruit

ssd1306_128x64_i2c example sketch and only changed the address to 0x78 on line 61 as this is the address set on the back of the display.

First tried with a Nano using SDA/SCL A4/A5 then on a UNO SDA/SCL (TWCK0/TWD0) still nothing! what am I doing wrong

P.S. here is the part I purchased

http://www.ebay.co.uk/itm/131265232056?_trksid=p2060778.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Thanks

Steve

The same display?
Riva:
Steve:

The heltec displays are known not to send the ACK signal (see above). Funny, although Riva's display is cheaper, it fully supports I2C.

@Steve: Try:

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK);

Oliver

Oliver, thanks for pointing that out :frowning: I can't believe there are so many variations!

OK, before I buy it, is this one good?

http://www.ebay.co.uk/itm/0-96-Inch-I2C-IIC-Serial-128-x-64-OLED-LCD-LED-Display-Module-For-Arduino-/271719319564?pt=UK_Computing_Other_Computing_Networking&hash=item3f43bbc80c

Thanks

P.S. Your suggestion didn't work, but thanks for trying.

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK);

scarr:
OK so I purchased a display just like yours (4 pin) SDA/DCL/GND/VCC tried it with the Adafruit

ssd1306_128x64_i2c example sketch and only changed the address to 0x78 on line 61 as this is the address set on the back of the display.

First tried with a Nano using SDA/SCL A4/A5 then on a UNO SDA/SCL (TWCK0/TWD0) still nothing! what am I doing wrong

I used an I2C scanner and set the address to what it found (0x3C in my case)

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3C (for the 128x64)

olikraus:
The same display?

I'm at work so will have to wait until go home and check this. I did look up purchase history on eBay but the display is not showing for some reason (I wanted to be sure about the seller). I do keep a list of stuff I bought but just the title and price and the top eBay search entry looks to be the same.

High Quality 0.96" IIC Serial 128X64 OLED LCD Display Module For Arduino Tool £3.25

I will take pictures when I have it in my hands again.