LCD bug

Hi, I have:
LCD: MC1602E-SYR
Arduino Uno R3
connected by schema Arduino Character LCD Tutorial.
It, running normaly, but after while it starts doing strenge things, more in video below.
- YouTube

#include <LiquidCrystal.h>

// Connections:
// rs (LCD pin 4) to Arduino pin 12
// rw (LCD pin 5) to Arduino pin 11
// enable (LCD pin 6) to Arduino pin 10
// LCD pin 15 to Arduino pin 13
// LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

void setup()
{
  lcd.begin(16,2);              // columns, rows.  use 16,2 for a 16x2 LCD, etc.
  lcd.clear();                  // start with a blank screen
  lcd.setCursor(0,0);           // set cursor to column 0, row 0 (the first row)
  lcd.print("Hello, World");    // change this text to whatever you like. keep it clean.
  delay(2000);
}

void loop()
{
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(int(millis()/1000));
  delay(1000);
}

Can please somebody help me? Thanks before.

EDIT: In code was backLight, but my display don't have it.

It's obviously caused by something in your loop() so why don't you compare yours with the one in the Arduino tutorial (http://arduino.cc/en/Tutorial/LiquidCrystal) and see what is different?

Don

What value resistor do you have connected between the Arduino pin 13 and the backlight? The tutorial calls for at least 40 ohms. I can't tell from your video whether you have a resistor or not. Without a resistor, you will overload the Arduino.

To Floresta: Thanks, but I can't see diference.
To dc42: Thanks, but my display don't have backlight. I have 10 K resistor between 5V and VDD(LCD 2. pin). In tutorial is it between contrast and ground. I somewhere read if i don't have potenciometr I can use 10 K resistor and get two status of contrast.

Looks like loose wiring to me. Bread boards are renowned for it. Try to eliminate the bread board.

Grumpy_Mike:
Looks like loose wiring to me. Bread boards are renowned for it. Try to eliminate the bread board.

Thanks, but the issue is here still.
Photo:

Edit: smaller image :slight_smile:
EDIT2: Now it have to be visible.

Thanks, but I can't see diference.

This line is different:

lcd.print(int(millis()/1000));

If that doesn't fix it then try this program:

#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, RW, E, D4, D5, D6, D7);
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

void setup()
  {
  lcd.begin(16, 2); 
  lcd.print("hello, world!");
  lcd.setCursor(0,1)
  lcd.print("it works!");
  }

void loop()
  {
  }

Don

LCD datasheets:
http://www.gme.cz/img/cache/doc/513/069/lcd-displej-everbouquet-mc1602e-syr-datasheet-1.pdf
http://www.gme.cz/img/cache/doc/513/069/lcd-displej-everbouquet-mc1602e-syr-datasheet-2.pdf
Wiring:


LCD Pin - Connect to
1 (VSS) - GND Arduino pin
2 (VDD) - Resistor 10K to + 5v Arduino pin
3 (contrast) - GND Arduino pin
4 RS - Arduino pin 12
5 R/W - Arduino pin 11
6 Enable - Arduino pin 10
7 No connection
8 No connection
9 No connection
10 No connection
11 (Data 4) - Arduino pin 5
12 (Data 5) - Arduino pin 4
13 (Data 6) - Arduino pin 3
14 (Data 7) - Arduino pin 2
15 No connection
16 No connection

EDIT: smaller images

Your wiring has to be correct otherwise you wouldn't get the correct message at the start.
Your contrast has to be satisfactory otherwise you wouldn't see anything legible on the display.

Don

floresta:

Thanks, but I can't see diference.

This line is different:

lcd.print(int(millis()/1000));

If that doesn't fix it then try this program:

#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, RW, E, D4, D5, D6, D7);
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

void setup()
 {
 lcd.begin(16, 2);
 lcd.print("hello, world!");
 lcd.setCursor(0,1)
 lcd.print("it works!");
 }

void loop()
 {
 }




Don

Oh, sorry I didn't notice :smiley: So I try it and after 20 seconds error was back. And your code worked 7 times from 10.

And your code worked 7 times from 10.

That's really not good enough.
What happened the other three times?

Don

floresta:

And your code worked 7 times from 10.

That's really not good enough.

Don

Yes it is good enogh, but I making thermoter for special device. And I need to update display many times and after one bad message . It is not redeable to the next reset.

floresta:
What happened the other three times?

The 7 times it looks like that:

And the three times it looks:

or that:

Amazing thing on that is in every case it looks like one from the three ones above.(I mean just this appear on screen, nothing more just this ones)

EDIT: Sorry nobody can see the images.

Why is there a 10K resistor in series with the LCD's power line as well as the contrast line? Wire the +ve line (pin 2 ) direct to 5V.

You said:-

Hi, I have:
LCD: MC1602E-SYR
Arduino Uno R3
connected by schema Arduino Character LCD Tutorial.

But the diagrams you have posted do not match up with how they have wired it up.

You just told us - and illustrated - what the problem is.

It is insane to put a 10k resistor in series with the power to the LCD. You have thoroughly confused some foolish instruction you found on some random website.

Connect the 5V directly to pin 2 on the LCD. Connect the 10k resistor from VCC to pin 3. Connect a 1k resistor from ground to pin 3 also.

Problem solved!


Grumpy_Mike:

Hi, I have:
LCD: MC1602E-SYR
Arduino Uno R3
connected by schema Arduino Character LCD Tutorial.

But the diagrams you have posted do not match up with how they have wired it up.

Ah yes - that website has caused considerable grief here in the past even if you did follow it accurately. :astonished:

Paul__B:
You just told us - and illustrated - what the problem is.

It is insane to put a 10k resistor in series with the power to the LCD. You have thoroughly confused some foolish instruction you found on some random website.

Connect the 5V directly to pin 2 on the LCD. Connect the 10k resistor from VCC to pin 3. Connect a 1k resistor from ground to pin 3 also.

Problem solved!


Grumpy_Mike:

Hi, I have:
LCD: MC1602E-SYR
Arduino Uno R3
connected by schema Arduino Character LCD Tutorial.

But the diagrams you have posted do not match up with how they have wired it up.

Ah yes - that website has caused considerable grief here in the past even if you did follow it accurately. :astonished:

Thanks a lot and again a lot, but I don't sure if i get it right can you please check this pic if it's right? Thank you.

EDIT: smaller images

I'll tell you what why not post the picture even bigger then no one will have any chance of seeing it.

, but I don't sure if i get it right can you please check this pic if it's right?

No, you only need one 10K resistor, from Vo, the contrast pin to ground.

Here are his images resized.

To the original poster, please resize before posting images so we can read them easily in future.

I'm sorry, but this is NOT how he should connect his LCD since his LCD has its pins at the lower left, not the upper left, and the pinout of his LCD is non-standard. His pins are numbered 14, 13, 12, . . . 3, 2, 1, 15, 16.

What we really need is a clear photograph of how his LCD is actually connected.

Don

floresta:
What we really need is a clear photograph of how his LCD is actually connected

Sorry the display is not connected, here is some pinout pics.





The green ones are GND and contarast, the blue one is 5V and the white ones are data wires.