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?
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.
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.
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.
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.
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.
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.