OLED Hangs after Upload when it was running

Hello everyone,

i have sucessfully connected an OLED Display wich uses an HD44780 Controler to my arduino. After playing with the library i got it to work. But whenever i upload a ne scretch on the arduino, i have to unplug the arduino and replaug it becaus the display hangs. After repowering everything wors fine? Do ihave connected something wrong or is it right that u always have to restart the whole board to work right?

CL

I think line 5 of your sketch is causing the problem, but it could be the black wire.

Don

Wait ... what wire? Maybe a photo? And a copy of your sketch? And your circuit?

Hi,

sorry the topic was general, so depending on your answers, this should not happen......

The circuit:

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground

the skretch:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(20, 2);
}

void loop() {
lcd.setCursor(0,0);
lcd.print("Hello World");
}

thats all :slight_smile:

Which version of the Arduino are you using?

Don

Probably not related to your current problem, but:

void loop() {
   lcd.setCursor(0,0); 
   lcd.print("Hello World");
}

Why is this stuff in loop() instead of in setup() where it belongs?

Also: Did you notice how the use of 'Code' tags improves the readability of the code?

Don

There are no Power and Ground wires going to your OLED display.
That is definitely a problem.

Hi,

oh sorry about the wires +5V goes to pin2 of the oled, GND to pin0 of the old

@floresta, jup you are right with the readability :D, I'm using the Arduino Uno R3 and 1.0 Software
at the moment i'm just messing arround with the OLED so i put theses lines in loop to see what happens. After altering some of the other stuff in the main loop (turning on leds) i realized that the OLED was not right reinitialized.

CL

I'm using the Arduino Uno R3

There was an issue with the bootloader in the SMD version of the Arduino UNO that caused problems similar to those you mentioned in your original post. I thought that newer versions including the R3 resolved this issue. Perhaps you should bring this up with your supplier, especially if your 'UNO' is not an authentic device.

Don

Hallo,

so i was trying arround with my display. I get the same Problem using an arduino mega, I answered in another Thread dialing with the same problem, so i put an link here only. in the other thread i uploaded a video so that you can see waht happens :frowning:

http://arduino.cc/forum/index.php/topic,91659.15.html

CL

This is confusing running two threads about the same thing. Locking this one.

Visit the link above if you want to comment on this.