I have an LCD 2004 connected with an Arduino UNO and is working almost in the way it should, but when I change some of the text written in the sketch it writes rubbish.
In this case, it is working properly:
lcd.begin(20,4);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(" TIME CONTROL");
lcd.setCursor(0,1);
lcd.print("Current:");
lcd.setCursor(0,2);
lcd.print("Start :");
lcd.setCursor(0,3);
lcd.print("Elapse :");
In case that I make just small change, it is writing rubbish in the 3th and 4th lines:
lcd.begin(20,4);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(" ...TIME CONTROL..."); <-------- small change
lcd.setCursor(0,1);
lcd.print("Current:");
lcd.setCursor(0,2);
lcd.print("Start :");
lcd.setCursor(0,3);
lcd.print("Elapse :");
Here you have the sketch, I am just starting with the application but this small starting part does not work properly, it would be nice if you have an idea to solve it.
Thanks
Jorge
#include <LiquidCrystal.h>
int VO = 3;
int RS = 4;
int E = 5;
int D4 = 6;
int D5 = 7;
int D6 = 8;
int D7 = 9;
LiquidCrystal lcd (RS,E,D4,D5,D6,D7);
void setup(){
analogWrite(VO,50);
lcd.begin(20,4);
lcd.setCursor(0,0);
lcd.print(" TIME CONTROL ");
lcd.setCursor(0,1);
lcd.print("Current:");
lcd.setCursor(0,2);
lcd.print("Start :");
lcd.setCursor(0,3);
lcd.print("Elapse :");
}
floresta:
You have to be more specific when it comes to the term 'rubbish'.
It looks like you may be using PWM for the contrast voltage - why?
Don
[Yes, I am using the PWM to avoid a potentiometer for the contrast voltage, perhaps is the noise introduced because of the PWM, to try I put the VO pin to earth and now it is working OK, should I put a filter in the VO input to work with the PWM?