Blue OLED 16x2 Display not acting like LCD Versions
Moderators: adafruit_support_bill, adafruit

Blue OLED 16x2 Display not acting like LCD Versions

by erikroby on Mon Jun 04, 2012 2:39 pm

I just bought one of the 16x2 blue OLEDs, and I am having some trouble getting it to work. I connected it just like I would a normal 16x2 LCD (the pins I am using seem to be the same according to the spec sheets, except for the LED and contrast pins which are not there). I am using the same sketch to test it:

#include <LiquidCrystal.h>
#include <Wire.h>

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

void setup()
{
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print("designed by");
lcd.setCursor(0,1);
lcd.print("Erik Roby");
delay(3000);
lcd.clear();
}

void loop()
{
lcd.setCursor(0,0);
lcd.print("void loop");
delay(3000);
lcd.clear();
delay(1000);
}


The display lights up, although the "designed by" and "Erik Roby" are displayed on the wrong lines, "designed by" shows up on the bottom row instead of the top. (When I say "wrong" this is compared to what I was expecting because of how it would show up on my 16x2 LCD.)

After the setup it will display "void loop", also on the bottom row. Then it clears once or twice and on the second, third, or fourth time running through the loop it will only show "v" and then freeze there. It seems a little odd to me that the loop will run a few times and then stop, and also that on the last time it only shows the first letter of the loop. The number of times it will run the loop varies, but has always been between 2 and 4 times. Are there different commands for the OLED vs LCD? Do I need to use different data pins than I would with the LCD?

If anyone else has run into this issue with a direct swap of the displays please let me know! I will try it with different cables and a different arduino tonight.

Thanks!
-Erik
erikroby
 
Posts: 5
Joined: Mon Jun 04, 2012 2:17 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by robodude666 on Mon Jun 04, 2012 3:00 pm

erik,

Just to confirm, you made the following connections:

OLED's VSS pin (Pin 1) is connected to ground
OLED's VDD pin (Pin 2) is connected to +5 on the Arduino
OLED's RS pin (Pin 4) is connected to Digital Pin 2
OLED's R/W pin (Pin 5) is connected to ground
OLED's EN pin (Pin 6) is connected to Digital Pin 3
OLED's D4 pin (Pin 11) is connected to Digital Pin 4
OLED's D5 pin (Pin 12) is connected to Digital Pin 5
OLED's D6 pin (Pin 13) is connected to Digital Pin 6
OLED's D7 pin (Pin 14) is connected to Digital Pin 7

The OLED's Pins 3, 7, 8, 9, 10, 15, and 16 should not be connected. The OLED's "top" row is the side with the header.

When you rotate the display so the header is on top, do you see:

designed by
Erik Roby

during the setup process? Or, when you rotate the display with the header do you see:

Erik Roby
designed by

?

Take a clear (focused, well-light) picture and show us! It's worth 1,000 words.

The flickering out issue sounds like it may not have enough power, or there may be a problem with the wiring being lose. Did you solder wires to the OLED? Make sure the joins are nice and shiny. Use a multi-meter in conductivity mode to make sure you have a good connection. Is the arduino powering anything else? Just an FYI, the OLED runs "optimal" at 3v based on the datasheet but the Arduino's 3.3v output can't really supply that much power so make sure to run it on the 5v one.

-robodude666
robodude666
 
Posts: 118
Joined: Sat Mar 27, 2010 11:12 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by erikroby on Wed Jun 06, 2012 2:52 am

Thank you for the reply, it turns out I did not have the the R/W (pin 5) grounded, but even after I fixed that the lines of the display are not in the correct order, (0,0) is showing up below (0,1).

With the header at the top, I see:

Erik Roby
designed by

This is shown in the picture attached.

The flicker is no longer an issue after connecting the second ground, but I am still not getting what I expect on the display. I have tried running the sketch on two different Arduinos, and have used two completely different sets of wires (the image shows the setup on a proto board, but I had the same results when directly connecting the screen with the two sets of different jumper wires). I have also swapped this display for a 16x2 white on blue LCD that I also bought through Adafruit, and it works exactly as expected, while the OLED does not. I resoldered the pins and have also tried wiggling them while they are connected and this doesn't seem to change anything. I don't appear to have any shorts between pins on the display either.

I also attached an image just after uploading an updated sketch which shows some random characters, I don't know if this is something to do with the display, or just that the Arduino sometimes does weird things after an upload but before a reset.

Is there anything else I should try or do you think there is a problem with the display?

Thanks!
-Erik
Attachments
2.jpg
random characters
2.jpg (51.01 KiB) Viewed 2735 times
1.jpg
was having trouble getting a non blurry shot without a lot of light but that kinda washed out the display a little, it looks good in person
1.jpg (91.26 KiB) Viewed 2735 times
erikroby
 
Posts: 5
Joined: Mon Jun 04, 2012 2:17 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by adafruit_support_bill on Wed Jun 06, 2012 5:42 am

Short-term, you should be able to work around this in code. I'll connect one up here and see if it is a problem unique to your unit.
User avatar
adafruit_support_bill
 
Posts: 29193
Joined: Sat Feb 07, 2009 9:11 am

Re: Blue OLED 16x2 Display not acting like LCD Versions

by techman on Sun Jun 10, 2012 7:24 pm

I am seeing the same type of behavior with this device. If I swap out the display for a standard LCD the code works. Most of the time it works from a cold power-up, however, pressing the reset button, or uploading a new program results in a blank display, or random characters.

I am running in 4bit mode, with the following.

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

Wired as:

lcd = PIN
1 = GND
2 = +5
3 = NC
4 = 12
5 = GND
6 = 11
11 = 5
12 = 4
13 = 3
14 = 2
15 = NC
16 = NC

On also tried Erik's code (with the changed pins) and I see the same results, random characters, and (sometimes) swapped lines.

I also tried wiring LCD 5 to pin 6, and used.

LiquidCrystal lcd(12,6,11, 5, 4, 3, 2);

Same results.

Thoughts?

-tim
techman
 
Posts: 4
Joined: Sun Jun 10, 2012 7:10 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by erikroby on Sun Jun 10, 2012 9:43 pm

When you say the same behavior do you mean the same "incorrect" behavior that I am seeing or the same behavior as a standard LCD?
erikroby
 
Posts: 5
Joined: Mon Jun 04, 2012 2:17 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by t37scott on Sun Jun 10, 2012 10:01 pm

I am having literally the exact same problems with this unit!!! So frustrating. My LCD shield works perfectly but when I use this screen I get the switched lines and the same random character message.
t37scott
 
Posts: 6
Joined: Sun May 27, 2012 8:44 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by techman on Sun Jun 10, 2012 10:04 pm

erikroby wrote:When you say the same behavior do you mean the same "incorrect" behavior that I am seeing or the same behavior as a standard LCD?


The same "incorrect" behavior.

-tim
techman
 
Posts: 4
Joined: Sun Jun 10, 2012 7:10 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by t37scott on Tue Jun 12, 2012 3:30 pm

Has this been tested at Adafruit yet? I feel like they have forgotten about this issue.
t37scott
 
Posts: 6
Joined: Sun May 27, 2012 8:44 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by erikroby on Tue Jun 12, 2012 3:36 pm

It sounds like they did test it and had the same problem, so it appears to be an issue with all of the displays. I'm not sure what that means for the people who bought it yet.
erikroby
 
Posts: 5
Joined: Mon Jun 04, 2012 2:17 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by adafruit_support_bill on Tue Jun 12, 2012 4:25 pm

Please stand by - we are still testing...
User avatar
adafruit_support_bill
 
Posts: 29193
Joined: Sat Feb 07, 2009 9:11 am

Re: Blue OLED 16x2 Display not acting like LCD Versions

by Codiak on Tue Jun 12, 2012 5:44 pm

For further information, I'm using the mircoliquidcrystal lib with a netduino plus.

Wired for 4 bit the LCD fails, wire it for 8 bit and it works fine.

I just got done testing with the SPI/I2C backpack and it fails similar to the previous 4 bit tests.
Reviewing the backpack design I'm convinced it is the 4 bit mode at issue perhaps it's the lack of implementation of the test pin.... Iv yet to identify a code workaround.

The LCD is fantastic visually, just wish it used fewer pins. How about making a backpack that can use 8bits? :-). While we're at it, how about a 20x4 model...
Codiak
 
Posts: 7
Joined: Tue Jun 12, 2012 5:33 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by Codiak on Mon Jun 18, 2012 12:25 pm

Is there any update on this issue?
Just trying to understand if I need to start looking for another I2C - LCD solution.

Thanks
Codiak
 
Posts: 7
Joined: Tue Jun 12, 2012 5:33 pm

Re: Blue OLED 16x2 Display not acting like LCD Versions

by adafruit_support_bill on Mon Jun 18, 2012 12:35 pm

Hi, These displays are not quite 100% software compatible with the LCD versions. We are currently testing a library update that will support these displays better.
User avatar
adafruit_support_bill
 
Posts: 29193
Joined: Sat Feb 07, 2009 9:11 am

Re: Blue OLED 16x2 Display not acting like LCD Versions

by t37scott on Wed Jun 20, 2012 3:03 pm

Thank you for the update. Please post when the library has been updated.
t37scott
 
Posts: 6
Joined: Sun May 27, 2012 8:44 pm