Go Down

Topic: LCD and Serial monitor problem (Read 78 times) previous topic - next topic

Hey all,

I have an arduino mega adk connected with an lcd 16x2.

LCD - ARDUINO MEGA PINS:

1->GND
2->5V
3->GND
4->P30
5->GND
6->P32
11->P34
12->P36
13->P38
14->P40

The sketch is working fine and i see the messages in LCD, but at the moment i open serial monitor (using arduino 1.0.6) my lcd monitor goes crazy with weird symbols.

Any solutions???

Code: [Select]
#include LiquidCrystal.h

// LiquidCrystal lcd(rs, enable, d4, d5, d6, d7);
LiquidCrystal lcd(30, 32, 34, 36, 38, 40);

void setup()
{
lcd.begin(16, 2);
}

void loop()
{
// lcd.setCursor(col, row);
  lcd.setCursor(0,0);
lcd.print("All I want");
delay(1000);
lcd.clear();
lcd.setCursor(0,1);
lcd.print(" to be,");
delay(1000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("is someone that");
delay(1000);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("makes new things");
delay(1000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("And thinks");
delay(1000);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("about them.");
delay(1000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("- John Maeda");
delay(1000);
lcd.clear();
}

maia

dont know if it's help, but i have such behavour with my OLED if I disconnect  GND wire "on fly".

CarlW

Why are you opening the serial monitor?

Your sketch is not printing to the serial monitor.

You could try Serial.begin (your serial monitor speed); in your setup function...


k_motor

Are you opening the serial monitor after the sketch has been running for a while?  Does the arduino reboot when you connect the serial?  If you do that, it will reboot the arduino but not reset the LCD (it still has power right?) -- the result will be bits sent to the LCD out of sequence to what the LCD controller chip is expecting.  Who knows what the arduino could be telling the LCD to do!  If this is the case, the LCD will never recover and will continue to display garbage. 

Somehow you need to open the serial when the arduino is not sending data to the LCD.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy